锘??xml version="1.0" encoding="utf-8" standalone="yes"?>超碰成人久久,久久精品99久久久香蕉,久久综合综合久久综合http://www.aygfsteel.com/fredcn/category/49809.html鍚炬湰甯冭。錛岀敓浜庡窛鍖楋紝韜€曚簬浠g爜鐨勭敯鍦頒笂銆?/description>zh-cnTue, 03 Dec 2013 13:29:23 GMTTue, 03 Dec 2013 13:29:23 GMT60Extend Gson to support field level custom conversionhttp://www.aygfsteel.com/fredcn/archive/2013/11/22/406605.htmlWest FarmerWest FarmerFri, 22 Nov 2013 11:22:00 GMThttp://www.aygfsteel.com/fredcn/archive/2013/11/22/406605.htmlhttp://www.aygfsteel.com/fredcn/comments/406605.htmlhttp://www.aygfsteel.com/fredcn/archive/2013/11/22/406605.html#Feedback2http://www.aygfsteel.com/fredcn/comments/commentRss/406605.htmlhttp://www.aygfsteel.com/fredcn/services/trackbacks/406605.html闃呰鍏ㄦ枃

]]>
Java榪愯鏃剁紪璇?/title><link>http://www.aygfsteel.com/fredcn/archive/2011/10/21/361751.html</link><dc:creator>West Farmer</dc:creator><author>West Farmer</author><pubDate>Fri, 21 Oct 2011 09:05:00 GMT</pubDate><guid>http://www.aygfsteel.com/fredcn/archive/2011/10/21/361751.html</guid><wfw:comment>http://www.aygfsteel.com/fredcn/comments/361751.html</wfw:comment><comments>http://www.aygfsteel.com/fredcn/archive/2011/10/21/361751.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/fredcn/comments/commentRss/361751.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/fredcn/services/trackbacks/361751.html</trackback:ping><description><![CDATA[<div style="font-size: 13px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #cccccc; border-right-color: #cccccc; border-bottom-color: #cccccc; border-left-color: #cccccc; padding-right: 5px; padding-bottom: 4px; padding-left: 4px; padding-top: 4px; width: 98%; word-break: break-all; background-color: #eeeeee; "><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">static</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">void</span><span style="color: #000000; "> main(String[] args) </span><span style="color: #0000FF; ">throws</span><span style="color: #000000; "> IOException {<br />         File sourceFile </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> File(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">c:\\java\\A.java</span><span style="color: #000000; ">"</span><span style="color: #000000; ">);<br />         JavaCompiler compiler </span><span style="color: #000000; ">=</span><span style="color: #000000; "> ToolProvider.getSystemJavaCompiler();<br />         System.out.println(System.getProperties().getProperty(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">java.class.path</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; ">;F:\\IndigoSpace\\ejp</span><span style="color: #000000; ">"</span><span style="color: #000000; ">);<br />         compiler.run(</span><span style="color: #0000FF; ">null</span><span style="color: #000000; ">, </span><span style="color: #0000FF; ">null</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; ">-cp</span><span style="color: #000000; ">"</span><span style="color: #000000; ">, System.getProperties().getProperty(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">java.class.path</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; ">;F:\\IndigoSpace\\ejp</span><span style="color: #000000; ">"</span><span style="color: #000000; ">, sourceFile.getPath());<br />         System.out.println(</span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> File(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">c:\\java\\</span><span style="color: #000000; ">"</span><span style="color: #000000; ">).toURI().toURL());<br />         URLClassLoader loader </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> URLClassLoader(</span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> URL[]{</span><span style="color: #0000FF; ">new</span><span style="color: #000000; "> File(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">c:\\java\\</span><span style="color: #000000; ">"</span><span style="color: #000000; ">).toURI().toURL()});<br />         </span><span style="color: #0000FF; ">try</span><span style="color: #000000; "> {<br />             loader.loadClass(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">A</span><span style="color: #000000; ">"</span><span style="color: #000000; ">);<br />         } </span><span style="color: #0000FF; ">catch</span><span style="color: #000000; "> (ClassNotFoundException e) {<br />             e.printStackTrace();<br />         }<br />     }</span></div> 闇€瑕佹敞鎰忕殑鏄紝涓婇潰鐨勪唬鐮佸彧鏈夊湪JDK涓婃墠鑳借繍琛岋紝鍥犱負JDK閲岄潰鎵嶆湁javac銆傝€屼笖鍦ㄥ疄闄呭簲鐢ㄤ腑錛屼綘榪樿<span style="color: red; ">鑷繁灝唒ackage澹版槑杞崲鎴愭枃浠剁洰褰?/span>錛屽惁鑰呰杞界被鐨勬椂鍊欏氨浼氭壘涓嶅埌銆?img src ="http://www.aygfsteel.com/fredcn/aggbug/361751.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/fredcn/" target="_blank">West Farmer</a> 2011-10-21 17:05 <a href="http://www.aygfsteel.com/fredcn/archive/2011/10/21/361751.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Java涓矞涓轟漢鐭ョ殑鍔熻兘http://www.aygfsteel.com/fredcn/archive/2011/10/12/361042.htmlWest FarmerWest FarmerWed, 12 Oct 2011 05:11:00 GMThttp://www.aygfsteel.com/fredcn/archive/2011/10/12/361042.htmlhttp://www.aygfsteel.com/fredcn/comments/361042.htmlhttp://www.aygfsteel.com/fredcn/archive/2011/10/12/361042.html#Feedback2http://www.aygfsteel.com/fredcn/comments/commentRss/361042.htmlhttp://www.aygfsteel.com/fredcn/services/trackbacks/361042.html闃呰鍏ㄦ枃

]]>
濡備綍琛¢噺涓€涓璞″疄渚嬩腑鐨勬暟鎹彂鐢熶簡鍙樺寲http://www.aygfsteel.com/fredcn/archive/2011/10/11/360976.htmlWest FarmerWest FarmerTue, 11 Oct 2011 08:51:00 GMThttp://www.aygfsteel.com/fredcn/archive/2011/10/11/360976.htmlhttp://www.aygfsteel.com/fredcn/comments/360976.htmlhttp://www.aygfsteel.com/fredcn/archive/2011/10/11/360976.html#Feedback0http://www.aygfsteel.com/fredcn/comments/commentRss/360976.htmlhttp://www.aygfsteel.com/fredcn/services/trackbacks/360976.html閭d箞濡備綍鏄庣‘鐩告瘮浜庝竴涓壒瀹氱殑鏃跺埢錛屾煇涓璞″疄渚嬩腑鐨勬暟鎹彂鐢熶簡鍙樺寲鍛紵

鏂規(guī)硶鑲畾涓嶆涓€縐嶏紝鎴戠殑鏂規(guī)硶鏄細
public static String hashOf(Serializable object) throws IOException, NoSuchAlgorithmException {
        ByteArrayOutputStream baos 
= new ByteArrayOutputStream();
        ObjectOutputStream oo 
= new ObjectOutputStream(baos);
        oo.writeObject(object);
        oo.flush();
        
        MessageDigest messageDigest 
= MessageDigest.getInstance("MD5");
        
byte[] data = baos.toByteArray();
        
        oo.close();
        baos.close();

        messageDigest.update(data, 
0, data.length);
        BigInteger hash 
= new BigInteger(1, messageDigest.digest());
        
return String.format("%1$032X", hash);
}

璇寸櫧浜嗗氨鏄妸涓€涓璞″疄渚嬬湅浣渂yte鏁扮粍錛岀劧鍚庡榪欎釜byte鏁扮粍璁$畻MD5錛屽鏋淢D5鍊間竴鏍峰氨琛ㄧず鎵€鍚暟鎹竴鑷淬€?br />MD5綆楁硶涓嶆槸瀹岀編鐨勶紝浣嗘槸鍦ㄥ疄闄呭簲鐢ㄤ腑宸茬粡瓚沖鐨勶紝浣犱篃鍙互浣跨敤CRC32銆?br />
嬈㈣繋鎸囨銆?img src ="http://www.aygfsteel.com/fredcn/aggbug/360976.html" width = "1" height = "1" />

]]>
主站蜘蛛池模板: 德化县| 民和| 理塘县| 株洲县| 威海市| 平山县| 水城县| 泽普县| 道真| 永和县| 宿松县| 开封县| 玉溪市| 仁寿县| 西充县| 鲁山县| 临沧市| 青岛市| 汤阴县| 福安市| 奉贤区| 临潭县| 黄大仙区| 田阳县| 开化县| 商洛市| 灵山县| 上杭县| 江口县| 五原县| 封开县| 壶关县| 鹿邑县| 宁陕县| 黑龙江省| 防城港市| 大城县| 星子县| 新建县| 马鞍山市| 濮阳市|