锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲日本久久一区二区va,亚洲视频精品在线,亚洲国产乱码最新视频http://m.tkk7.com/yjlongfei/category/42249.htmlzh-cnSun, 10 Jan 2010 22:50:10 GMTSun, 10 Jan 2010 22:50:10 GMT60鍒ゆ柇鏂囦歡鏍煎紡http://m.tkk7.com/yjlongfei/archive/2010/01/10/308936.html嫻旈槼姹熷ご澶滈佸嫻旈槼姹熷ご澶滈佸Sun, 10 Jan 2010 11:56:00 GMThttp://m.tkk7.com/yjlongfei/archive/2010/01/10/308936.htmlhttp://m.tkk7.com/yjlongfei/comments/308936.htmlhttp://m.tkk7.com/yjlongfei/archive/2010/01/10/308936.html#Feedback0http://m.tkk7.com/yjlongfei/comments/commentRss/308936.htmlhttp://m.tkk7.com/yjlongfei/services/trackbacks/308936.html棣栧厛闃呰姝ゆ枃涔嬪墠錛屾渶濂介槄璇?br /> http://hi.baidu.com/maml897/blog/item/324bf86369961ed4e6113a5c.html

http://hi.baidu.com/maml897/blog/item/fa5f0a7e1edef00129388ae2.html

鍏舵榪樿鐭ラ亾涓鐐瑰父璇嗭紝灝辨槸鎴戜滑鍦ㄨ浜嬫湰絳変竴浜涙枃鏈伐鍏蜂腑 鍐欑殑閮芥槸瀛楃錛屾病鏈夎皝浼?xì)鍘诲啓瀛楄妭锛堝彲浠ュ啓瀛楄妭锛屼絾鏄鐢ㄥ咃L(fēng)壒孌婄殑緙栬緫鍣級(jí)錛屼絾鏄叾瀹烇紝鎴戜滑鐨勫啓鐨勬槸瀛楃錛屼絾紓佺洏?shù)笂鐪熷疄瀛樺偍鐨勬槸瀛楄妭銆?/p>

榪欓噷灝卞嚭鐜頒簡(jiǎn)杞崲鐨勯棶棰橈紝褰撶劧錛岃繖浜涢棶棰樿浜嬫湰鏈韓浼?xì)甯姪鎴戜滑瑙e啛雬傛垜浠墦寮涓涓浜嬫湰錛岀劧鍚庢枃浠?-鍙﹀瓨?shù)负锛屼綘浼?xì)鍙戠幇鏈夊嚑縐嶅瓨鍌ㄦ牸寮忎緵鎮(zhèn)ㄩ夋嫨錛?br /> ANSI鏍煎紡錛氬氨鏄痑scii鐨勬牸寮?br /> Unicode鏍煎紡錛氶噰鐢ㄥ浗闄呴氱敤鐨勭紪鐮佸瓨鍌?br /> Unicode big endian鏍煎紡錛氳繖涓拰unicode鏈夌偣鍖哄埆錛屼絾鎴戜篃涓嶆槑澶叿浣撶殑涓嶅悓
UTF-8錛氶噰鐢╱tf-8瀛樺偍錛岀湅榪囦笂闈㈢殑涓ょ瘒鏂囩珷錛屼綘浼?xì)鍗佸垎鐨勪簡(jiǎn)瑙q欓噷浠嬬粛鐨勭紪鐮併俇tf-8錛屾槸unicode鐨勪竴縐嶅疄鐜版柟寮忋?/p>

渚嬪鎴戜滑鍦ㄨ浜嬫湰閲岄潰杈撳叆“榪為?#8221;涓や釜瀛椼?/p>

1.鎴戜滑鍙﹀瓨璁頒簨鏈殑鏃跺欙紝閲囩敤unicode瀛樺偍錛岄偅涔堣櫧鐒舵垜浠湅鍒扮殑瀛楃榪樻槸“榪為?#8221;錛屼絾鏄叾瀹炲瓨鍌ㄥ湪紓佺洏?shù)笂鐨勫瓧鑺?紜疄
8FDE錛堣繛錛?901A 錛堥氾級(jí)錛岃繖涓槸瑙勫畾鐨勶紝unicode鏄浗闄呬笂瑙勫畾鐨勶紝緇欎笘鐣屼笂鐨勬瘡涓瓧絎﹀垎閰嶇殑鍞竴緙栫爜銆傝幏鍙栨煇涓瓧絎︾殑unicode鐨勬柟娉曪紝鍙互鍘葷綉涓婃煡鎵撅紝鏈綆鍗曠殑鏂規(guī)硶錛屽氨鏄墦寮word鏂囨。錛岃緭鍏ュ瓧絎︼紝鎶婂厜鏍囩Щ鍔ㄥ埌瀛楃鍚庨潰錛屾寜alt+x錛寃ord浼?xì)鑷姩鎶婂瓧绗﹁浆鎹㈡垚unicode緙栫爜錛岃繖閲屽憿鎴戜滑涔熷彲浠ョ湅鍒幫紝鐢╱nicode瀛樺偍姹夊瓧鍟婏紝姣忎釜姹夊瓧鍗犵敤涓や釜瀛楄妭銆?/p>

2.鎴戜滑鍙﹀瓨璁頒簨鏈殑鏃跺欙紝閲囩敤utf-8瀛樺偍錛岃櫧鐒舵垜浠湅鍒扮殑瀛楃榪樻槸“榪為?#8221;錛屼絾鏄叾瀹炲瓨鍌ㄥ湪紓佺洏?shù)笂鐨勫瓧鑺?紜疄宸茬粡鍙樺寲浜?jiǎn)锛寴q欐椂鍊欏瓨鍌ㄧ殑鏄?br /> E8 BF 9E 錛堣繛錛塃9 80 9A錛堥氾級(jí)銆傝繖灝辨槸utf-8鐨勫瓨鍌ㄧ殑緙栫爜錛岃嚦浜巙tf-8涓轟粈涔堣繖鏍峰瓨鍌紝浣犲彲浠ラ槄璇諱笂闈㈢殑涓ょ瘒鏂囩珷鏉ヤ簡(jiǎn)瑙o紝鍙互鐪嬪埌錛寀tf-8浣跨敤3涓瓧鑺傚瓨鍌ㄤ竴涓眽瀛椼?/p>

鍙﹀鎴戜滑榪樿鐭ラ亾鐨勫氨鏄細(xì)鐢?shù)鑴戞庝箞鍖哄垎涓涓浜嬫湰鏄敤浠涔堝瓨鍌ㄧ殑鍛紵
鎹㈠彞璇濊錛屼負(fù)浠涔堟垜鐢╱nicode瀛樺偍鐨?FDE錛堣繛錛?901A 錛堥氾級(jí)錛岀數(shù)鑴戝氨鐭ラ亾榪欐槸unicode緙栫爜錛屼粠鑰屼嬌鐢╱nicode瑙g爜錛岃繕鍘熶負(fù)“榪為?#8221;鍛紵鐢?shù)鑴戝張鎬庝箞鐭ラ亾E8 BF 9E 錛堣繛錛塃9 80 9A錛堥氾級(jí)榪欐槸鎸夌収utf-8鐨勫瓨鍌ㄦ柟寮忓瓨鍌ㄧ殑鍛紵

榪欓噷鏈変竴鐐規(guī)爣璁幫紝灝辨槸鍦ㄥ瓨鍌ㄥ瓧鑺傜殑鏃跺欙紝璁頒簨鏈鍏堝湪鏈鍓嶉潰 鏍囨槑錛岃繖涓浜嬫湰涓嬮潰鐨勫瓨鍌ㄦ牸寮?鏄痷tf-8錛岃繕鏄痷nicode銆?/p>

渚嬪錛?/p>

1.unicode瀛樺偍“榪為?#8221;銆傜鐩樺瓧鑺傜湡瀹炲瓨鍌ㄧ殑鍏跺疄鏄細(xì)

FF FE 8FDE 901A

鍓嶄袱涓狥F FE鏄爣璁幫紝鍛婅瘔鐢?shù)鑴戝Q岃繖涓枃妗g殑瀛樺偍鏂瑰紡鏄痷nicode

2.utf-8瀛樺偍“榪為?#8221;銆傜鐩樺瓧鑺傜湡瀹炲瓨鍌ㄧ殑鍏跺疄鏄細(xì)

EF BB BF E8 BF 9E E9 80 9A

鍓嶄笁涓狤F BB BF 鍛婅瘔鐢?shù)鑴?榪欎釜鏂囨。鏄痷tf-8瀛樺偍鐨?/p>

鏍規(guī)嵁涓嶅悓緙栫爜鐨勭壒鐐瑰拰鏍囧織,瀵逛竴涓枃鏈枃浠跺垽鏂紪鐮佹柟娉曞涓?br /> 1  .  UTF7  鎵鏈夊瓧鑺傜殑鍐呭涓嶄細(xì)澶т簬127,涔熷氨鏄笉澶т簬&HFF
2  .  UTF8  璧峰涓変釜瀛楄妭涓?0xEF 0xBB 0xBF"
3  .  UTF-16BE 璧峰涓変釜瀛楄妭涓?0xFE  0xFF"
4  .  UTF-16LE 璧峰涓変釜瀛楄妭涓?0xFF  0xFE"


import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;

public class FileEncodeReferee
{
    
private File file;
    
    
public FileEncodeReferee(File file)
    
{
        
this.file = file;
    }

    
    
public FileEncodeReferee(String path)
    
{
        file 
= new File(path);
    }

    
    
public String getCharset()
    
{
        File file 
= this.file;
        
        String charset 
= "GBK";
        
byte[] first3Bytes = new byte[3];
        BufferedInputStream bis 
= null;
        
try
        
{
            
//boolean checked = false;
            bis = new BufferedInputStream(new FileInputStream(file));
            bis.mark(
0);
            
int read = bis.read(first3Bytes, 03);
            
if (read == -1)
            
{
                
return charset;
            }

            
if (first3Bytes[0== (byte0xFF && first3Bytes[1== (byte0xFE)
            
{
                charset 
= "UTF-16LE";
                
//checked = true;
            }

            
else if (first3Bytes[0== (byte0xFE
                    
&& first3Bytes[1== (byte0xFF)
            
{
                charset 
= "UTF-16BE";
                
//checked = true;
            }

            
else if (first3Bytes[0== (byte0xEF
                    
&& first3Bytes[1== (byte0xBB
                    
&& first3Bytes[2== (byte0xBF)
            
{
                charset 
= "UTF-8";
                
//checked = true;
            }

            
/** */
            
/*******************************************************************
            * bis.reset(); if (!checked) { int loc = 0; while ((read =
            * bis.read()) != -1) { loc++; if (read >= 0xF0) { break; } if (0x80 <=
            * read && read <= 0xBF) // 鍗曠嫭鍑虹幇BF浠ヤ笅鐨勶紝涔熺畻鏄疓BK { break; } if (0xC0 <=
            * read && read <= 0xDF) { read = bis.read(); if (0x80 <= read &&
            * read <= 0xBF)// 鍙屽瓧鑺?nbsp;(0xC0 - 0xDF) { // (0x80 - 0xBF),涔熷彲鑳藉湪GB緙栫爜鍐?br />             * continue; } else { break; } } else if (0xE0 <= read && read <=
            * 0xEF) { // 涔熸湁鍙兘鍑洪敊錛屼絾鏄嚑鐜囪緝?yōu)?nbsp;read = bis.read(); if (0x80 <= read &&
            * read <= 0xBF) { read = bis.read(); if (0x80 <= read && read <=
            * 0xBF) { charset = "UTF-8"; break; } else { break; } } else {
            * break; } } } System.out.println(loc + " " +
            * Integer.toHexString(read)); }
            *****************************************************************
*/

        }

        
catch (Exception e)
        
{
            e.printStackTrace();
        }

        
finally
        
{
            
if (bis != null)
            
{
                
try
                
{
                    bis.close();
                }

                
catch (Exception ex)
                
{
                    ex.printStackTrace();
                }

            }

        }

        
return charset;
    }

    
    
public static void main(String[] args)
    
{
        FileEncodeReferee fer 
= new FileEncodeReferee("F://閿佽〃1.sql");
        System.out.println(fer.getCharset());
    }

}



]]>
net.sf.cglib.beans.BeanMap 閲嶅啓toString()鐨勭敤娉?/title><link>http://m.tkk7.com/yjlongfei/archive/2009/10/19/298898.html</link><dc:creator>嫻旈槼姹熷ご澶滈佸</dc:creator><author>嫻旈槼姹熷ご澶滈佸</author><pubDate>Mon, 19 Oct 2009 13:41:00 GMT</pubDate><guid>http://m.tkk7.com/yjlongfei/archive/2009/10/19/298898.html</guid><wfw:comment>http://m.tkk7.com/yjlongfei/comments/298898.html</wfw:comment><comments>http://m.tkk7.com/yjlongfei/archive/2009/10/19/298898.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/yjlongfei/comments/commentRss/298898.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/yjlongfei/services/trackbacks/298898.html</trackback:ping><description><![CDATA[鍦╟glib 涓?BeanMap鐨勭敤娉?br /> <br /> 1.瀵煎叆cglib-nodep-2.1.3.jar<br />   <br /> 2.鍦╦avaBean 瀵硅薄涓噸鍐檛oString()鏂規(guī)硶  姣斿鏄疷serManageVo.Java <br />  public String toString(){<br />   return BeanTools.getBeanDesc(UserManageVo.this);<br />  }<br /> java 浠g爜<br /> <div style="border-right: #cccccc 1px solid; padding-right: 5px; border-top: #cccccc 1px solid; padding-left: 4px; font-size: 13px; padding-bottom: 4px; border-left: #cccccc 1px solid; width: 98%; word-break: break-all; padding-top: 4px; border-bottom: #cccccc 1px solid; background-color: #eeeeee"><span style="color: #008080"> 1</span><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><span style="color: #0000ff">package</span><span style="color: #000000"> BeanUtils;<br /> </span><span style="color: #008080"> 2</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> </span><span style="color: #008080"> 3</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /></span><span style="color: #0000ff">import</span><span style="color: #000000"> net.sf.cglib.beans.BeanMap;<br /> </span><span style="color: #008080"> 4</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/None.gif" align="top" alt="" /><br /> </span><span style="color: #008080"> 5</span><span style="color: #000000"><img id="Codehighlighter1_79_1608_Open_Image" onclick="this.style.display='none'; Codehighlighter1_79_1608_Open_Text.style.display='none'; Codehighlighter1_79_1608_Closed_Image.style.display='inline'; Codehighlighter1_79_1608_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_79_1608_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_79_1608_Closed_Text.style.display='none'; Codehighlighter1_79_1608_Open_Image.style.display='inline'; Codehighlighter1_79_1608_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> BeanTools </span><span id="Codehighlighter1_79_1608_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_79_1608_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080"> 6</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> String LINE </span><span style="color: #000000">=</span><span style="color: #000000"> System.getProperty(</span><span style="color: #000000">"</span><span style="color: #000000">line.separator</span><span style="color: #000000">"</span><span style="color: #000000">, </span><span style="color: #000000">"</span><span style="color: #000000">\r\n</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080"> 7</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> </span><span style="color: #008080"> 8</span><span style="color: #000000"><img id="Codehighlighter1_161_247_Open_Image" onclick="this.style.display='none'; Codehighlighter1_161_247_Open_Text.style.display='none'; Codehighlighter1_161_247_Closed_Image.style.display='inline'; Codehighlighter1_161_247_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_161_247_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_161_247_Closed_Text.style.display='none'; Codehighlighter1_161_247_Open_Image.style.display='inline'; Codehighlighter1_161_247_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span id="Codehighlighter1_161_247_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_161_247_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080"> 9</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />     * 瀵硅薄涓噸鍐檛oString()鏂規(guī)硶,鍦ㄦ墦鍗版棩蹇楃殑鏃跺欒皟鐢?br /> </span><span style="color: #008080">10</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />     * </span><span style="color: #808080">@param</span><span style="color: #008000"> obj<br /> </span><span style="color: #008080">11</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />     * </span><span style="color: #808080">@return</span><span style="color: #008000"><br /> </span><span style="color: #008080">12</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />     * </span><span style="color: #808080">@return</span><span style="color: #008000"> String<br /> </span><span style="color: #008080">13</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />     </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">14</span><span style="color: #000000"><img id="Codehighlighter1_295_1606_Open_Image" onclick="this.style.display='none'; Codehighlighter1_295_1606_Open_Text.style.display='none'; Codehighlighter1_295_1606_Closed_Image.style.display='inline'; Codehighlighter1_295_1606_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_295_1606_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_295_1606_Closed_Text.style.display='none'; Codehighlighter1_295_1606_Open_Image.style.display='inline'; Codehighlighter1_295_1606_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">static</span><span style="color: #000000"> String getBeanDesc(Object obj) </span><span id="Codehighlighter1_295_1606_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_295_1606_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">15</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        StringBuffer bf </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> StringBuffer();<br /> </span><span style="color: #008080">16</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        bf.append(LINE </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">{</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> LINE </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">Class = </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> obj.getClass().getName()<br /> </span><span style="color: #008080">17</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                </span><span style="color: #000000">+</span><span style="color: #000000"> LINE);<br /> </span><span style="color: #008080">18</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        BeanMap beanMap </span><span style="color: #000000">=</span><span style="color: #000000"> BeanMap.create(obj);<br /> </span><span style="color: #008080">19</span><span style="color: #000000"><img id="Codehighlighter1_502_1561_Open_Image" onclick="this.style.display='none'; Codehighlighter1_502_1561_Open_Text.style.display='none'; Codehighlighter1_502_1561_Closed_Image.style.display='inline'; Codehighlighter1_502_1561_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_502_1561_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_502_1561_Closed_Text.style.display='none'; Codehighlighter1_502_1561_Open_Image.style.display='inline'; Codehighlighter1_502_1561_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">for</span><span style="color: #000000"> (Object object : beanMap.keySet()) </span><span id="Codehighlighter1_502_1561_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_502_1561_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">20</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />            Object value </span><span style="color: #000000">=</span><span style="color: #000000"> beanMap.get(object);<br /> </span><span style="color: #008080">21</span><span style="color: #000000"><img id="Codehighlighter1_565_1512_Open_Image" onclick="this.style.display='none'; Codehighlighter1_565_1512_Open_Text.style.display='none'; Codehighlighter1_565_1512_Closed_Image.style.display='inline'; Codehighlighter1_565_1512_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_565_1512_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_565_1512_Closed_Text.style.display='none'; Codehighlighter1_565_1512_Open_Image.style.display='inline'; Codehighlighter1_565_1512_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />            </span><span style="color: #0000ff">if</span><span style="color: #000000"> (</span><span style="color: #0000ff">null</span><span style="color: #000000"> </span><span style="color: #000000">!=</span><span style="color: #000000"> value) </span><span id="Codehighlighter1_565_1512_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_565_1512_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">22</span><span style="color: #000000"><img id="Codehighlighter1_571_601_Open_Image" onclick="this.style.display='none'; Codehighlighter1_571_601_Open_Text.style.display='none'; Codehighlighter1_571_601_Closed_Image.style.display='inline'; Codehighlighter1_571_601_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_571_601_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_571_601_Closed_Text.style.display='none'; Codehighlighter1_571_601_Open_Image.style.display='inline'; Codehighlighter1_571_601_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span id="Codehighlighter1_571_601_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_571_601_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">23</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                 * 榪欐槸瀹氫箟瀵硅薄鐨勬槸鏃跺欑敤鍒?br /> </span><span style="color: #008080">24</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                 </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">25</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                String className </span><span style="color: #000000">=</span><span style="color: #000000"> value.getClass().getName();<br /> </span><span style="color: #008080">26</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (className.startsWith(</span><span style="color: #000000">"</span><span style="color: #000000">test.UserManageEvent</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> </span><span style="color: #008080">27</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                        </span><span style="color: #000000">||</span><span style="color: #000000"> className.startsWith(</span><span style="color: #000000">"</span><span style="color: #000000">test.BasicEvent</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> </span><span style="color: #008080">28</span><span style="color: #000000"><img id="Codehighlighter1_808_874_Open_Image" onclick="this.style.display='none'; Codehighlighter1_808_874_Open_Text.style.display='none'; Codehighlighter1_808_874_Closed_Image.style.display='inline'; Codehighlighter1_808_874_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_808_874_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_808_874_Closed_Text.style.display='none'; Codehighlighter1_808_874_Open_Image.style.display='inline'; Codehighlighter1_808_874_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                        </span><span style="color: #000000">||</span><span style="color: #000000"> className.startsWith(</span><span style="color: #000000">"</span><span style="color: #000000">test.UserManageVo</span><span style="color: #000000">"</span><span style="color: #000000">)) </span><span id="Codehighlighter1_808_874_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_808_874_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">29</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                    bf.append(object </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000"> = </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> getBeanDesc(value) </span><span style="color: #000000">+</span><span style="color: #000000"> LINE);<br /> </span><span style="color: #008080">30</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">31</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" /><br /> </span><span style="color: #008080">32</span><span style="color: #000000"><img id="Codehighlighter1_881_911_Open_Image" onclick="this.style.display='none'; Codehighlighter1_881_911_Open_Text.style.display='none'; Codehighlighter1_881_911_Closed_Image.style.display='inline'; Codehighlighter1_881_911_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_881_911_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_881_911_Closed_Text.style.display='none'; Codehighlighter1_881_911_Open_Image.style.display='inline'; Codehighlighter1_881_911_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span id="Codehighlighter1_881_911_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_881_911_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">33</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                 * 榪欐槸鏁扮粍瀵硅薄鐨勬槸鏃跺欑敤鍒?br /> </span><span style="color: #008080">34</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                 </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">35</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (className.startsWith(</span><span style="color: #000000">"</span><span style="color: #000000">Ltest.UserManageEvent</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> </span><span style="color: #008080">36</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                        </span><span style="color: #000000">||</span><span style="color: #000000"> className.startsWith(</span><span style="color: #000000">"</span><span style="color: #000000">Ltest.BasicEvent</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> </span><span style="color: #008080">37</span><span style="color: #000000"><img id="Codehighlighter1_1070_1230_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1070_1230_Open_Text.style.display='none'; Codehighlighter1_1070_1230_Closed_Image.style.display='inline'; Codehighlighter1_1070_1230_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1070_1230_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1070_1230_Closed_Text.style.display='none'; Codehighlighter1_1070_1230_Open_Image.style.display='inline'; Codehighlighter1_1070_1230_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                        </span><span style="color: #000000">||</span><span style="color: #000000"> className.startsWith(</span><span style="color: #000000">"</span><span style="color: #000000">Ltest.UserManageVo</span><span style="color: #000000">"</span><span style="color: #000000">)) </span><span id="Codehighlighter1_1070_1230_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1070_1230_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">38</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                    Object[] objs </span><span style="color: #000000">=</span><span style="color: #000000"> (Object[]) value;<br /> </span><span style="color: #008080">39</span><span style="color: #000000"><img id="Codehighlighter1_1154_1224_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1154_1224_Open_Text.style.display='none'; Codehighlighter1_1154_1224_Closed_Image.style.display='inline'; Codehighlighter1_1154_1224_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1154_1224_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1154_1224_Closed_Text.style.display='none'; Codehighlighter1_1154_1224_Open_Image.style.display='inline'; Codehighlighter1_1154_1224_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                    </span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">; i </span><span style="color: #000000"><</span><span style="color: #000000"> objs.length; i</span><span style="color: #000000">++</span><span style="color: #000000">) </span><span id="Codehighlighter1_1154_1224_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1154_1224_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">40</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                        bf.append(object </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000"> = </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> getBeanDesc(objs[i]) </span><span style="color: #000000">+</span><span style="color: #000000"> LINE);<br /> </span><span style="color: #008080">41</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">42</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">43</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                <br /> </span><span style="color: #008080">44</span><span style="color: #000000"><img id="Codehighlighter1_1241_1282_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1241_1282_Open_Text.style.display='none'; Codehighlighter1_1241_1282_Closed_Image.style.display='inline'; Codehighlighter1_1241_1282_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1241_1282_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1241_1282_Closed_Text.style.display='none'; Codehighlighter1_1241_1282_Open_Image.style.display='inline'; Codehighlighter1_1241_1282_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span id="Codehighlighter1_1241_1282_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff">/** */</span><span id="Codehighlighter1_1241_1282_Open_Text"><span style="color: #008000">/**</span><span style="color: #008000"><br /> </span><span style="color: #008080">45</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                 * 瀵筍tring鏁扮粍閲嶅啓toString()鏂規(guī)硶<br /> </span><span style="color: #008080">46</span><span style="color: #008000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                 </span><span style="color: #008000">*/</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">47</span><span style="color: #000000"><img id="Codehighlighter1_1336_1507_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1336_1507_Open_Text.style.display='none'; Codehighlighter1_1336_1507_Closed_Image.style.display='inline'; Codehighlighter1_1336_1507_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1336_1507_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1336_1507_Closed_Text.style.display='none'; Codehighlighter1_1336_1507_Open_Image.style.display='inline'; Codehighlighter1_1336_1507_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                </span><span style="color: #0000ff">if</span><span style="color: #000000"> (className.startsWith(</span><span style="color: #000000">"</span><span style="color: #000000">[Ljava.lang.String</span><span style="color: #000000">"</span><span style="color: #000000">)) </span><span id="Codehighlighter1_1336_1507_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1336_1507_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">48</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                    Object[] objs </span><span style="color: #000000">=</span><span style="color: #000000"> (Object[]) value;<br /> </span><span style="color: #008080">49</span><span style="color: #000000"><img id="Codehighlighter1_1420_1501_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1420_1501_Open_Text.style.display='none'; Codehighlighter1_1420_1501_Closed_Image.style.display='inline'; Codehighlighter1_1420_1501_Closed_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" alt="" /><img id="Codehighlighter1_1420_1501_Closed_Image" style="display: none" onclick="this.style.display='none'; Codehighlighter1_1420_1501_Closed_Text.style.display='none'; Codehighlighter1_1420_1501_Open_Image.style.display='inline'; Codehighlighter1_1420_1501_Open_Text.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif" align="top" alt="" />                    </span><span style="color: #0000ff">for</span><span style="color: #000000"> (</span><span style="color: #0000ff">int</span><span style="color: #000000"> i </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">0</span><span style="color: #000000">; i </span><span style="color: #000000"><</span><span style="color: #000000"> objs.length; i</span><span style="color: #000000">++</span><span style="color: #000000">) </span><span id="Codehighlighter1_1420_1501_Closed_Text" style="border-right: #808080 1px solid; border-top: #808080 1px solid; display: none; border-left: #808080 1px solid; border-bottom: #808080 1px solid; background-color: #ffffff"><img src="http://m.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_1420_1501_Open_Text"><span style="color: #000000">{<br /> </span><span style="color: #008080">50</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                        bf.append(object </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">[</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> i </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">]</span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000"> = </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> objs[i]<br /> </span><span style="color: #008080">51</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />                                </span><span style="color: #000000">+</span><span style="color: #000000"> LINE);<br /> </span><span style="color: #008080">52</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">53</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />                }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">54</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />            }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">55</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />            bf.append(object </span><span style="color: #000000">+</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000"> = </span><span style="color: #000000">"</span><span style="color: #000000"> </span><span style="color: #000000">+</span><span style="color: #000000"> value </span><span style="color: #000000">+</span><span style="color: #000000"> LINE);<br /> </span><span style="color: #008080">56</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />        }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">57</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        bf.append(</span><span style="color: #000000">"</span><span style="color: #000000">}</span><span style="color: #000000">"</span><span style="color: #000000">);<br /> </span><span style="color: #008080">58</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/InBlock.gif" align="top" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> bf.toString();<br /> </span><span style="color: #008080">59</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" alt="" />    }</span></span><span style="color: #000000"><br /> </span><span style="color: #008080">60</span><span style="color: #000000"><img src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" alt="" />}</span></span></div> <br /> java浠g爜<br /> <a href="/Files/yjlongfei/beanUtil.rar">/Files/yjlongfei/beanUtil.rar</a> <img src ="http://m.tkk7.com/yjlongfei/aggbug/298898.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/yjlongfei/" target="_blank">嫻旈槼姹熷ご澶滈佸</a> 2009-10-19 21:41 <a href="http://m.tkk7.com/yjlongfei/archive/2009/10/19/298898.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>BeanUtils.copyProperties() 鐢ㄦ硶http://m.tkk7.com/yjlongfei/archive/2009/10/19/298894.html嫻旈槼姹熷ご澶滈佸嫻旈槼姹熷ご澶滈佸Mon, 19 Oct 2009 13:21:00 GMThttp://m.tkk7.com/yjlongfei/archive/2009/10/19/298894.htmlhttp://m.tkk7.com/yjlongfei/comments/298894.htmlhttp://m.tkk7.com/yjlongfei/archive/2009/10/19/298894.html#Feedback0http://m.tkk7.com/yjlongfei/comments/commentRss/298894.htmlhttp://m.tkk7.com/yjlongfei/services/trackbacks/298894.html涓銆佺畝浠嬶細(xì)

        BeanUtils鎻愪緵瀵笿ava鍙嶅皠鍜岃嚜鐪丄PI鐨勫寘瑁呫傚叾涓昏鐩殑鏄埄鐢ㄥ弽灝勬満鍒跺JavaBean鐨勫睘鎬ц繘琛屽鐞嗐傛垜浠煡閬擄紝涓涓狫avaBean閫氬父鍖呭惈浜?jiǎn)澶ч噺鐨勫睘鎬э紝寰堝鎯呭喌涓嬶紝瀵笿avaBean鐨勫鐞嗗鑷村ぇ閲廹et/set浠g爜鍫嗙Н錛屽鍔犱簡(jiǎn)浠g爜闀垮害鍜岄槄璇諱唬鐮佺殑闅懼害銆?/span>

浜屻佺敤娉曪細(xì)

        濡傛灉浣犳湁涓や釜鍏鋒湁寰堝鐩稿悓灞炴х殑JavaBean錛屾垜浠涓涓璞opy 鍒板彟澶栦竴涓璞★紝鍙敤鐢ㄤ笅闈㈢殑鏂規(guī)硶銆?br />
1. 瀵煎叆commons-beanutils.jar
2. 瀵煎叆commons-logging-1.1.jar
3. 鏋勫緩UserManageVo , UserManageEvent 瀵硅薄 ,榪欎袱涓璞$殑灞炴х浉鍚?br /> 4. 璋冪敤 BeanUtils.copyProperties(UserManageVo, UserManageEvent)
 java 涓昏浠g爜

 1import java.lang.reflect.InvocationTargetException;
 2import org.apache.commons.beanutils.BeanUtils;
 3import test.BasicEvent;
 4import test.UserManageEvent;
 5import test.UserManageVo;
 6
 7public class TestCase {
 8    
 9    public static void main(String[] args) {
10        UserManageEvent event = new UserManageEvent();
11        event.setName("zhangsan");
12        event.setUserId("1");
13        
14        BasicEvent basicEvt = new BasicEvent();
15        basicEvt.setEventId("2");
16        basicEvt.setVersion("version");
17        
18        event.setEvent(basicEvt);
19        UserManageVo vo = new UserManageVo();
20        try {
21            BeanUtils.copyProperties(vo, event);
22            System.out.println(vo.getUserId());
23            System.out.println(vo.getName());
24            System.out.println(vo.getEvent());
25        }
 catch (IllegalAccessException e) {
26            e.printStackTrace();
27        }
 catch (InvocationTargetException e) {
28            e.printStackTrace();
29        }
 
30    }

31}


java浠g爜錛?br /> /Files/yjlongfei/test.rar



]]>
主站蜘蛛池模板: 亚洲一级毛片在线观| 免费无码黄网站在线看| 亚洲综合精品网站在线观看| 91福利视频免费观看| 亚洲AV日韩AV永久无码色欲 | 成人网站免费观看| 免费网站观看WWW在线观看| 免费无码VA一区二区三区| 99视频免费在线观看| 四虎精品免费永久免费视频| 亚洲人成毛片线播放| 亚洲无人区视频大全| 亚洲视频在线观看免费| 亚洲人成网站在线观看青青| 亚洲AV无码成人专区片在线观看 | 中文字幕中韩乱码亚洲大片| 免费一级做a爰片性色毛片| 女人毛片a级大学毛片免费| 亚洲一区二区三区免费在线观看 | 风间由美在线亚洲一区| 亚洲欧美日韩中文无线码| 亚洲综合亚洲国产尤物| 五月天网站亚洲小说| 麻豆亚洲AV永久无码精品久久| 久久久久亚洲av无码专区蜜芽| 亚洲av专区无码观看精品天堂| 特黄特色大片免费| 免费人成视频在线播放| 一区二区三区免费视频观看| 人成午夜免费大片在线观看| 无码人妻一区二区三区免费n鬼沢| 久久这里只精品热免费99| 国产va在线观看免费| 日韩黄色免费观看| 国产精品va无码免费麻豆| 亚洲 无码 在线 专区| 亚洲Av无码国产情品久久| 亚洲人精品午夜射精日韩| 亚洲国产精品无码一线岛国| 亚洲av无码专区国产乱码在线观看 | 国产在线观看www鲁啊鲁免费|