锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产亚洲精久久久久久无码,亚洲伦理一区二区,中文字幕亚洲情99在线 http://m.tkk7.com/anchor110/category/45626.htmlzh-cn Fri, 20 Apr 2018 16:02:40 GMT Fri, 20 Apr 2018 16:02:40 GMT 60 org.apache.axiom.om.OMException: No meta factory found for feature 'default';閿欒瑙e喅鍔炴硶 http://m.tkk7.com/anchor110/articles/433158.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Tue, 17 Apr 2018 12:14:00 GMT http://m.tkk7.com/anchor110/articles/433158.html http://m.tkk7.com/anchor110/comments/433158.html http://m.tkk7.com/anchor110/articles/433158.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/433158.html http://m.tkk7.com/anchor110/services/trackbacks/433158.html Exception in thread "main" org.apache.axiom.om.OMException: No meta factory found for feature 'default'; this usually means that axiom-impl.jar is not in the classpath at org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:170) at org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:135) at org.apache.axiom.om.OMAbstractFactory.getOMFactory(OMAbstractFactory.java:184) at org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:72) at org.apache.axis2.description.AxisService.<init>(AxisService.java:323) at org.apache.axis2.description.AxisService.<init>(AxisService.java:394) at com.ailk.boss.external.ws.External2Oss_PortTypeServiceStub.populateAxisService(External2Oss_PortTypeServiceStub.java:41) at com.ailk.boss.external.ws.External2Oss_PortTypeServiceStub.<init>(External2Oss_PortTypeServiceStub.java:88) at com.ailk.boss.external.ws.External2Oss_PortTypeServiceStub.<init>(External2Oss_PortTypeServiceStub.java:77) at com.ailk.boss.external.ws.External2Oss_PortTypeServiceStub.<init>(External2Oss_PortTypeServiceStub.java:123) at WooEquipmentSend.send2Esb(WooEquipmentSend.java:20) at WooPPPoEServiceTest.testGetPPPoEAndSettings(WooPPPoEServiceTest.java:32) at WooPPPoEServiceTest.main(WooPPPoEServiceTest.java:18) 瑙e喅鍔炴硶錛?br />1銆佸皢緋葷粺渚濊禆鐨勪互涓嬩笁涓猨ar鍖呯増鏈粠1.2.13鏇挎崲涓?.2.12鍗沖彲錛?br />axiom-api-1.2.12.jar
axiom-dom-1.2.12.jar
axiom-impl-1.2.12.jar
]]> Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object http://m.tkk7.com/anchor110/articles/395110.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Mon, 04 Feb 2013 07:38:00 GMT http://m.tkk7.com/anchor110/articles/395110.html http://m.tkk7.com/anchor110/comments/395110.html http://m.tkk7.com/anchor110/articles/395110.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/395110.html http://m.tkk7.com/anchor110/services/trackbacks/395110.html Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
闂鍘熷洜鏄細jre/lib鐩綍涓嬶紝緙哄皯rt.jar鏂囦歡銆?br /> 瑙e喅鍔炴硶錛氬幓鍒殑鏈嶅姟鍣ㄤ笂鎷瘋礉rt.jar鍗沖彲銆?img src ="http://m.tkk7.com/anchor110/aggbug/395110.html" width = "1" height = "1" /> ]]> Caused by: java.lang.NoClassDefFoundError: com/sun/xml/bind/CycleRecoverable http://m.tkk7.com/anchor110/articles/391408.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Thu, 15 Nov 2012 20:53:00 GMT http://m.tkk7.com/anchor110/articles/391408.html http://m.tkk7.com/anchor110/comments/391408.html http://m.tkk7.com/anchor110/articles/391408.html#Feedback 1 http://m.tkk7.com/anchor110/comments/commentRss/391408.html http://m.tkk7.com/anchor110/services/trackbacks/391408.html 1銆佸皢jaxb-impl-2.1.12.jar鍜宩axb-api-2.1.jar鏀懼埌jre/lib/endorsed/鐩綍涓嬶紝濡傛灉娌℃湁endorsed鐩綍錛屽垯鏂板緩涔嬶紝涓鑸儏鍐典笅鏄病鏈夌殑銆?br />2銆佸皢jaxb-impl-2.1.12.jar鍜宩axb-api-2.1.jar鏀懼埌$TOMCAT_HOME/lib/endorsed/鐩綍涓嬶紝濡傛灉娌℃湁endorsed鐩綍錛屽垯鏂板緩涔嬶紝涓鑸儏鍐典笅鏄病鏈夌殑銆?img src ="http://m.tkk7.com/anchor110/aggbug/391408.html" width = "1" height = "1" /> ]]> CountDownLatch鐨勪嬌鐢紙娉細杞澆浜巋ttp://m.tkk7.com/fanjs2000/archive/2012/10/31/390521.html錛?/title> http://m.tkk7.com/anchor110/articles/390549.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Wed, 31 Oct 2012 09:19:00 GMT http://m.tkk7.com/anchor110/articles/390549.html http://m.tkk7.com/anchor110/comments/390549.html http://m.tkk7.com/anchor110/articles/390549.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/390549.html http://m.tkk7.com/anchor110/services/trackbacks/390549.html CountDownLatch濡傚叾鎵鍐欙紝鏄竴涓掕鏁扮殑閿佸瓨鍣紝褰撹鏁板噺鑷?鏃惰Е鍙戠壒瀹氱殑浜嬩歡銆傚埄鐢ㄨ繖縐嶇壒鎬э紝鍙互璁╀富綰跨▼絳夊緟瀛愮嚎紼嬬殑緇撴潫銆備笅闈互涓涓ā鎷熻繍鍔ㄥ憳姣旇禌鐨勪緥瀛愬姞浠ヨ鏄庛?/div>import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class Test { private static final int PLAYER_AMOUNT = 5 ; public static void main(String[] args) { // 瀵逛簬姣忎綅榪愬姩鍛橈紝CountDownLatch鍑?鍚庡嵆緇撴潫姣旇禌 CountDownLatch begin = new CountDownLatch( 1 ); // 瀵逛簬鏁翠釜姣旇禌錛屾墍鏈夎繍鍔ㄥ憳緇撴潫鍚庢墠綆楃粨鏉?/span> CountDownLatch end = new CountDownLatch(PLAYER_AMOUNT); Player[] plays = new Player[PLAYER_AMOUNT]; for ( int i = 0 ; i < PLAYER_AMOUNT; i ++ ) plays[i] = new Player(i + 1 , begin, end); // 璁劇疆鐗瑰畾鐨勭嚎紼嬫睜錛屽ぇ灝忎負5 ExecutorService exe = Executors.newFixedThreadPool(PLAYER_AMOUNT); for (Player p : plays) exe.execute(p); // 鍒嗛厤綰跨▼ begin.countDown(); System.out.println( " Race begins! " ); try { end.await(); // 絳夊緟end鐘舵佸彉涓?錛屽嵆涓烘瘮璧涚粨鏉?/span> } catch (InterruptedException e) { // TODO: handle exception e.printStackTrace(); } finally { System.out.println( " Race ends! " ); } exe.shutdown(); } } class Player implements Runnable { private int id; private CountDownLatch begin; private CountDownLatch end; public Player( int i, CountDownLatch begin, CountDownLatch end) { // TODO Auto-generated constructor stub super (); this .id = i; this .begin = begin; this .end = end; } public void run() { // TODO Auto-generated method stub try { begin.await(); // 絳夊緟begin鐨勭姸鎬佷負0 Thread.sleep(( long ) (Math.random() * 100 )); // 闅忔満鍒嗛厤鏃墮棿錛屽嵆榪愬姩鍛樺畬鎴愭椂闂?/span> System.out.println( " Play " + id + " arrived. " ); } catch (InterruptedException e) { // TODO: handle exception e.printStackTrace(); } finally { end.countDown(); // 浣縠nd鐘舵佸噺1錛屾渶緇堝噺鑷? } } }
]]> synchronized(this) 瑙i噴 http://m.tkk7.com/anchor110/articles/388699.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Thu, 27 Sep 2012 08:03:00 GMT http://m.tkk7.com/anchor110/articles/388699.html http://m.tkk7.com/anchor110/comments/388699.html http://m.tkk7.com/anchor110/articles/388699.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/388699.html http://m.tkk7.com/anchor110/services/trackbacks/388699.html public class DemoThread implements Runnable { public void run() { synchronized ( this ) { // 璇烽棶榪欓噷鐨則his鎬庢牱鐞嗚В錛宼1鍜宼2鐨勫湴鍧涓嶆槸涓嶄竴鏍峰槢錛屾庝箞浼氬彧鏈変竴涓嚎紼嬭繍琛岋紵錛燂紵 for ( int i = 0 ; i < 5 ; i ++ ) { System.out.println(Thread.currentThread().getName() + " synchronized loop " + i); } } } public static void main(String[] args) { DemoThread t1 = new DemoThread(); Thread ta = new Thread(t1, " A " ); Thread tb = new Thread(t1, " B " ); ta.start(); tb.start(); } } 瑙i噴錛?br /> 榪欓噷鐨則his鏄寚褰撳墠瀵硅薄,涔熷氨鏄涓嶇ta榪樻槸tb,鍒氬紑濮嬭繍琛岃繖孌典唬鐮佺殑鏃跺欎細緇欒繖孌典唬鐮佸姞涓攣,榪欐牱鍗充嬌榪愯鍒頒腑闂磋鏇挎崲浜? 鍙︿竴涓嚎紼嬩篃涓嶄細鎵ц榪欐浠g爜,鍥犱負榪欐浠g爜鍔犻攣浜?鑰岄挜鍖欏湪緇欎唬鐮佸姞閿佺殑閭d釜綰跨▼鎵嬮噷,鍙湁鍔犻攣鐨勭嚎紼嬭繍琛屽畬榪欐浠g爜,鎵嶄細緇欎唬鐮佽В閿? 鐒跺悗鍏朵粬綰跨▼鎵嶈兘鎵ц榪欐浠g爜.. 鍔犱釜synchronized(this)浠ュ悗榪愯緇撴灉鏄繖鏍? A synchronized loop 0 A synchronized loop 1 A synchronized loop 2 A synchronized loop 3 A synchronized loop 4 B synchronized loop 0 B synchronized loop 1 B synchronized loop 2 B synchronized loop 3 B synchronized loop 4 涓嶅姞鐨勮瘽鏄繖鏍?(欏哄簭涔變簡,鏈夊ソ澶氱緇撴灉,榪欓噷鍙槸鍏朵腑涓縐?.. A synchronized loop 0 B synchronized loop 0 A synchronized loop 1 B synchronized loop 1 A synchronized loop 2 B synchronized loop 2 A synchronized loop 3 B synchronized loop 3 B synchronized loop 4 A synchronized loop 4 ]]> java綰跨▼榪愯鏈哄埗 http://m.tkk7.com/anchor110/articles/379874.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Sun, 03 Jun 2012 14:09:00 GMT http://m.tkk7.com/anchor110/articles/379874.html http://m.tkk7.com/anchor110/comments/379874.html http://m.tkk7.com/anchor110/articles/379874.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/379874.html http://m.tkk7.com/anchor110/services/trackbacks/379874.html 闃呰鍏ㄦ枃 ]]> Arrays.asList浣跨敤 http://m.tkk7.com/anchor110/articles/362588.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Thu, 03 Nov 2011 02:18:00 GMT http://m.tkk7.com/anchor110/articles/362588.html http://m.tkk7.com/anchor110/comments/362588.html http://m.tkk7.com/anchor110/articles/362588.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/362588.html http://m.tkk7.com/anchor110/services/trackbacks/362588.html 1 String[] strings = { " xujiaolin " , " chengsk " , " caisiming " }; 2 List < String > list = Arrays.asList(strings); 3 System.out.println(list.size()); ]]> java final鍏抽敭瑙i噴 http://m.tkk7.com/anchor110/articles/362585.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Thu, 03 Nov 2011 02:02:00 GMT http://m.tkk7.com/anchor110/articles/362585.html http://m.tkk7.com/anchor110/comments/362585.html http://m.tkk7.com/anchor110/articles/362585.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/362585.html http://m.tkk7.com/anchor110/services/trackbacks/362585.html 瑙i噴濡備笅錛?br />1銆佸鏋滄瀵硅薄鎸囧悜涓涓父閲忥細 渚嬪錛歠inal int a = 100;閭d箞a鐨勫兼案榪滄槸100銆?br /> 鍚庣畫濡傛灉閲嶆柊璧嬪鹼紝灝嗕細鎶ョ紪璇戦敊璇細a = 200; 2銆佸鏋滄瀵硅薄鎸囧悜涓涓彉閲忥細 渚嬪錛歠inal User admin = new User("administrator");閭d箞浠h〃admin榪欎釜瀵硅薄寮曠敤涓嶅彲鏀瑰彉銆備絾鏄嵈鍙互鏀瑰彉浠栫殑灞炴у箋?br /> 浠ヤ笅璇彞緙栬瘧姝g‘錛?br /> admin.setName("admin"); 浠ヤ笅璇彞緙栬瘧閿欒錛?br /> admin = new User("zhangsan"); ]]> HttpUrlConnection閫氳繃浠g悊璁塊棶緗戠粶錛堣漿錛歨ttp://www.iteye.com/problems/38978錛?/title> http://m.tkk7.com/anchor110/articles/360413.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Mon, 10 Oct 2011 09:52:00 GMT http://m.tkk7.com/anchor110/articles/360413.html http://m.tkk7.com/anchor110/comments/360413.html http://m.tkk7.com/anchor110/articles/360413.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/360413.html http://m.tkk7.com/anchor110/services/trackbacks/360413.html import java.io.IOException; import java.io.InputStream; import java.net.InetSocketAddress; import java.net.MalformedURLException; import java.net.Proxy; import java.net.ProxySelector; import java.net.SocketAddress; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.URLConnection; import java.util.List; import java.util.Properties; public class NetProxy { // 嫻嬭瘯鏈湴JVM鐨勭綉緇滅己鐪侀厤緗?nbsp; public void setLocalProxy() { Properties prop = System.getProperties(); //璁劇疆http璁塊棶瑕佷嬌鐢ㄧ殑浠g悊鏈嶅姟鍣ㄧ殑鍦板潃 prop.setProperty("http.proxyHost", "10.10.0.96"); //璁劇疆http璁塊棶瑕佷嬌鐢ㄧ殑浠g悊鏈嶅姟鍣ㄧ殑绔彛 prop.setProperty("http.proxyPort", "8080"); //璁劇疆涓嶉渶瑕侀氳繃浠g悊鏈嶅姟鍣ㄨ闂殑涓繪満錛屽彲浠ヤ嬌鐢?閫氶厤絎︼紝澶氫釜鍦板潃鐢▅鍒嗛殧 prop.setProperty("http.nonProxyHosts", "localhost|10.10.*"); //璁劇疆瀹夊叏璁塊棶浣跨敤鐨勪唬鐞嗘湇鍔″櫒鍦板潃涓庣鍙?nbsp; //瀹冩病鏈塰ttps.nonProxyHosts灞炴э紝瀹冩寜鐓ttp.nonProxyHosts 涓緗殑瑙勫垯璁塊棶 prop.setProperty("https.proxyHost", "10.10.0.96"); prop.setProperty("https.proxyPort", "443"); //浣跨敤ftp浠g悊鏈嶅姟鍣ㄧ殑涓繪満銆佺鍙d互鍙婁笉闇瑕佷嬌鐢╢tp浠g悊鏈嶅姟鍣ㄧ殑涓繪満 prop.setProperty("ftp.proxyHost", "10.10.0.96"); prop.setProperty("ftp.proxyPort", "2121"); prop.setProperty("ftp.nonProxyHosts", "localhost|10.10.*"); //socks浠g悊鏈嶅姟鍣ㄧ殑鍦板潃涓庣鍙?nbsp; prop.setProperty("socksProxyHost", "10.10.0.96"); prop.setProperty("socksProxyPort", "1080"); } // 娓呴櫎proxy璁劇疆 public void removeLocalProxy() { Properties prop = System.getProperties(); prop.remove("http.proxyHost"); prop.remove("http.proxyPort"); prop.remove("http.nonProxyHosts"); prop.remove("https.proxyHost"); prop.remove("https.proxyPort"); prop.remove("ftp.proxyHost"); prop.remove("ftp.proxyPort"); prop.remove("ftp.nonProxyHosts"); prop.remove("socksProxyHost"); prop.remove("socksProxyPort"); } // // 嫻嬭瘯http public void showHttpProxy(Object... proxy) { URL url = null; try { url = new URL("http://blog.csdn.com/smallnest"); } catch (MalformedURLException e) { return; } try { URLConnection conn = null; switch (proxy.length) { case 0: conn = url.openConnection(); break; case 1: conn = url.openConnection((Proxy) proxy[0]); break; default: break; } if (conn == null) return; conn.setConnectTimeout(3000); // 璁劇疆榪炴帴瓚呮椂鏃墮棿 InputStream in = conn.getInputStream(); byte[] b = new byte[1024]; try { while (in.read(b) > 0) { System.out.println(new String(b)); } } catch (IOException e1) { } } catch (IOException e1) { e1.printStackTrace(); } } // 嫻嬭瘯ftp public void showFtpProxy(Object... proxy) { URL url = null; try { url = new URL("ftp://ftp.tsinghua.edu.cn"); } catch (MalformedURLException e) { return; } try { URLConnection conn = null; switch (proxy.length) { case 0: conn = url.openConnection(); break; case 1: conn = url.openConnection((Proxy) proxy[0]); break; default: break; } if (conn == null) return; conn.setConnectTimeout(3000); // 璁劇疆榪炴帴瓚呮椂鏃墮棿 InputStream in = conn.getInputStream(); byte[] b = new byte[1024]; try { while (in.read(b) > 0) { System.out.println(new String(b)); } } catch (IOException e1) { } } catch (IOException e1) { e1.printStackTrace(); } } // 寰楀埌涓涓猵roxy public Proxy getProxy(Proxy.Type type, String host, int port) { SocketAddress addr = new InetSocketAddress(host,port); Proxy typeProxy = new Proxy(type, addr); return typeProxy; } public static void main(String[] args) { NetProxy proxy = new NetProxy(); //嫻嬭瘯浠g悊鏈嶅姟鍣?nbsp; proxy.setLocalProxy(); proxy.showHttpProxy(); //涓嬮潰涓よ鏄竻闄ょ郴緇熷睘鎬э紝鑰岄氳繃Proxy綾繪寚瀹氫唬鐞嗘湇鍔″櫒 // proxy.removeLocalProxy //proxy.showHttpProxy(proxy.getProxy(Proxy.Type.SOCKS,"10.10.0.96",1080)); } } ]]> java.net.ProtocolException http://m.tkk7.com/anchor110/articles/355875.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Fri, 05 Aug 2011 07:53:00 GMT http://m.tkk7.com/anchor110/articles/355875.html http://m.tkk7.com/anchor110/comments/355875.html http://m.tkk7.com/anchor110/articles/355875.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/355875.html http://m.tkk7.com/anchor110/services/trackbacks/355875.html 鍋歛ndroid鐧誨綍鍔熻兘鏃訛紝鍚戞湇鍔″櫒鍙戦佷竴涓櫥褰曢獙璇佽姹傦紝鍒╃敤鐨勯氫俊鏄嚜宸卞寘瑁呯殑http閫氫俊綾伙紝閲岄潰鏈変唬鐮佸涓嬶細URL url = new URL(reqAddress); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setConnectTimeout(5000); conn.setReadTimeout(6000);
conn.setRequestMethod("post"); 涓榪愯錛宭ogcat鎶ラ敊濡備笅錛?br />
java.net.ProtocolException
瑙e喅鍔炴硶錛?br />淇敼
post 涓哄ぇ鍐橮OST銆?br />
璇存槑錛?br />
httpURLConnection.setRequestMethod("POST");
setRequestMethod鏂規硶鐨勫弬鏁板煎繀欏誨ぇ鍐?渚嬪GET,POST絳?
]]> tomcat鏃ュ織綰㈣壊闂瑙e喅鍔炴硶 http://m.tkk7.com/anchor110/articles/355732.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Thu, 04 Aug 2011 02:43:00 GMT http://m.tkk7.com/anchor110/articles/355732.html http://m.tkk7.com/anchor110/comments/355732.html http://m.tkk7.com/anchor110/articles/355732.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/355732.html http://m.tkk7.com/anchor110/services/trackbacks/355732.html 鍦╡clipse涓惎鍔╰omcat鏃訛紝鍦╟onsole涓緭鍑虹殑鏃ュ織淇℃伅涓虹孩鑹詫紝浣嗗叾瀹炵▼搴忓茍娌℃湁閿欒銆?br /> 鍘熷洜鏄細tomcat榛樿鐨勬棩蹇楄緭鍑烘寜jdk涓殑System.err鏉ヨ緭鍑猴紝鑰孲ystem.err鍦╡clipse涓紝浠ョ孩鑹叉樉紺恒?br /> 瑙e喅鍔炴硶錛?br />Eclipse 涓?System.err 鐨勬樉紺洪鑹插彲浠ラ氳繃 Window --> Preference --> Run/Debug --> Console 鐨?Standard Error text color 榪涜鏇存敼銆?br /> JDK 鏃ュ織鍏蜂綋鐨勮緭鍑哄鐞嗙被闇瑕佸湪 %JRE_HOME%/lib/logging.properties 閰嶇疆鐨?handlers 鎸囧畾錛屽彲浠ヤ嬌鐢? System.out 閲嶅啓涓涓?java.util.logging.ConsoleHandler 閰嶇疆榪涘幓灝卞彲浠ヤ簡銆?/div> ]]> Java鑾峰緱涓涓瓧絎︾殑Ascii鍊?/title> http://m.tkk7.com/anchor110/articles/353702.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Tue, 05 Jul 2011 05:04:00 GMT http://m.tkk7.com/anchor110/articles/353702.html http://m.tkk7.com/anchor110/comments/353702.html http://m.tkk7.com/anchor110/articles/353702.html#Feedback 1 http://m.tkk7.com/anchor110/comments/commentRss/353702.html http://m.tkk7.com/anchor110/services/trackbacks/353702.html int aAscii = a; System.out.println(aAscii); ]]> java.net.SocketException: Unexpected end of file from server http://m.tkk7.com/anchor110/articles/348867.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Sat, 23 Apr 2011 07:28:00 GMT http://m.tkk7.com/anchor110/articles/348867.html http://m.tkk7.com/anchor110/comments/348867.html http://m.tkk7.com/anchor110/articles/348867.html#Feedback 8 http://m.tkk7.com/anchor110/comments/commentRss/348867.html http://m.tkk7.com/anchor110/services/trackbacks/348867.html
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:741)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:604)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:738)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:604)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:961)
鑾悕濂囧錛屾槑鏄庡ご澶╁湪鍏徃鏄彲浠ョ敤鐨勩?br />
鍦ㄧ綉涓婃悳绱簡涓涓嬶紝璇村彲鑳芥槸緗戠粶闄愬埗閫犳垚鐨勩傛垜緇撳悎鑷繁鎵鍦ㄧ綉緇滅殑鎯呭喌錛屽彂瑙夋槸鏈夎繖鎯呭喌銆傛妸緗戠粶鏀規垚璺熷闈竴鏍風殑鍚庯紝闂瑙e喅銆?br />
]]> 浣跨敤java瀹炵幇緗戠粶浼犺緭鏁版嵁鐨勫帇緙╋紙鏉ユ簮緗戠粶錛?/title> http://m.tkk7.com/anchor110/articles/348441.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Sun, 17 Apr 2011 07:59:00 GMT http://m.tkk7.com/anchor110/articles/348441.html http://m.tkk7.com/anchor110/comments/348441.html http://m.tkk7.com/anchor110/articles/348441.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/348441.html http://m.tkk7.com/anchor110/services/trackbacks/348441.html
import java.util.zip.*;
public class GZIProc {
public static void main(String[] args) {
byte[] b1 ,b2 = null;
try {
BufferedInputStream in = new BufferedInputStream( new FileInputStream(args[0]));
ByteArrayOutputStream bout = new ByteArrayOutputStream();
GZIPOutputStream out = new GZIPOutputStream(bout);
ObjectOutputStream oout = new ObjectOutputStream(out);
// 璇誨彇婧愭枃浠?
b1 = new byte[in.available()];
in.read(b1,0,b1.length);
System.out.println( "鍘嬬緝鍓?\n " + new String(b1));
// 鍘嬬緝
//out.write(b1,0, b1.length);
oout.writeObject(new String(b1));
oout.flush();
oout.close();
// 璇誨彇鍘嬬緝瀛楄妭嫻?
b2 = bout.toByteArray();
System.out.println( "鍘嬬緝鍚?\n " + new String(b2));
// 鍏抽棴鏁版嵁嫻?
in.close();
// 瑙e帇
ObjectInputStream in2 = new
ObjectInputStream(new GZIPInputStream(new
ByteArrayInputStream(b2)));
byte[] b3 = ((String)in2.readObject()).getBytes();
in2.close();
// 杈撳嚭
System.out.println( new String(b3));
} catch(Exception e) {
e.printStackTrace();
}
}
}
]]> java灝咺nputStream杞負byte鏁扮粍鐨勬柟娉?/title> http://m.tkk7.com/anchor110/articles/343500.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Tue, 25 Jan 2011 06:44:00 GMT http://m.tkk7.com/anchor110/articles/343500.html http://m.tkk7.com/anchor110/comments/343500.html http://m.tkk7.com/anchor110/articles/343500.html#Feedback 3 http://m.tkk7.com/anchor110/comments/commentRss/343500.html http://m.tkk7.com/anchor110/services/trackbacks/343500.html ByteArrayOutputStream baos = new ByteArrayOutputStream();
int len = 0 ;
byte [] b = new byte [ 1024 ];
while ((len = is.read(b, 0 , b.length)) != - 1 ) {
baos.write(b, 0 , len);
}
byte [] buffer = baos.toByteArray();
]]> java.net.URL澶勭悊涓枃URL錛屽鑷磈ava.io.FileNotFoundException http://m.tkk7.com/anchor110/articles/342456.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Thu, 06 Jan 2011 13:57:00 GMT http://m.tkk7.com/anchor110/articles/342456.html http://m.tkk7.com/anchor110/comments/342456.html http://m.tkk7.com/anchor110/articles/342456.html#Feedback 1 http://m.tkk7.com/anchor110/comments/commentRss/342456.html http://m.tkk7.com/anchor110/services/trackbacks/342456.html
URL url = new URL("http://***/涓浗.doc");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
鎵ц浠ヤ笂浠g爜鏃訛紝浼氭姤java.io.FileNotFoundException寮傚父銆?br />
緇忔煡錛屽彂鐜版槸url鍦板潃鍚腑鏂囬棶棰樺鑷寸殑銆?br />
瑙e喅鍔炴硶錛?br />
瀵逛腑鏂囬儴鍒嗚繘琛宔ncode,鍏蜂綋濡備笅錛?br />
URL url = new URL("http://***/" + java.net.URLEncoder.encode("涓浗") + ".doc");
]]> JAVA瑙f瀽XML瀛楃涓?/title> http://m.tkk7.com/anchor110/articles/342312.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Tue, 04 Jan 2011 13:57:00 GMT http://m.tkk7.com/anchor110/articles/342312.html http://m.tkk7.com/anchor110/comments/342312.html http://m.tkk7.com/anchor110/articles/342312.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/342312.html http://m.tkk7.com/anchor110/services/trackbacks/342312.html 1 DocumentBuilderFactory docBuilderFactory = null ;
2 DocumentBuilder docBuilder = null ;
3 Document doc = null ;
4 docBuilderFactory = DocumentBuilderFactory.newInstance();
5 docBuilder = docBuilderFactory.newDocumentBuilder();
6 InputStream inputStream = new ByteArrayInputStream(xml.getBytes()); // xml涓鴻瑙f瀽鐨勫瓧絎︿覆
7 doc = docBuilder.parse(inputStream);
]]> 16榪涘埗瀛楃涓茶漿鎹㈡垚鏁板瓧綾誨瀷 http://m.tkk7.com/anchor110/articles/342168.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Sun, 02 Jan 2011 11:57:00 GMT http://m.tkk7.com/anchor110/articles/342168.html http://m.tkk7.com/anchor110/comments/342168.html http://m.tkk7.com/anchor110/articles/342168.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/342168.html http://m.tkk7.com/anchor110/services/trackbacks/342168.html public class Test {
public static void main(String[] args) {
String s = " 0x40 " ;
int b = Integer.parseInt(s.replaceAll( " ^0[x|X] " , "" ), 16 );
System.out.println(( char )b);
}
}
]]> java涓嬌鐢∕D5鍔犲瘑綆楁硶榪涜鍔犲瘑(娉細杞澆浜巋ttp://school.cfan.com.cn/pro/java/2007-06-11/1181531460d67777.shtml) http://m.tkk7.com/anchor110/articles/341737.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Tue, 28 Dec 2010 03:10:00 GMT http://m.tkk7.com/anchor110/articles/341737.html http://m.tkk7.com/anchor110/comments/341737.html http://m.tkk7.com/anchor110/articles/341737.html#Feedback 0 http://m.tkk7.com/anchor110/comments/commentRss/341737.html http://m.tkk7.com/anchor110/services/trackbacks/341737.html 錛堜竴錛夋秷鎭憳瑕佺畝浠?/strong>
涓涓秷鎭憳瑕佸氨鏄竴涓暟鎹潡鐨勬暟瀛楁寚綰廣傚嵆瀵逛竴涓換鎰忛暱搴︾殑涓涓暟鎹潡榪涜璁$畻錛屼駭鐢熶竴涓敮涓鎸囧嵃錛堝浜嶴HA1鏄駭鐢熶竴涓?0瀛楄妭鐨勪簩榪涘埗鏁扮粍錛夈傛秷鎭?
鎽樿鏄竴縐嶄笌娑堟伅璁よ瘉鐮佺粨鍚堜嬌鐢ㄤ互紜繚娑堟伅瀹屾暣鎬х殑鎶鏈備富瑕佷嬌鐢ㄥ崟鍚戞暎鍒楀嚱鏁扮畻娉曪紝鍙敤浜庢楠屾秷鎭殑瀹屾暣鎬э紝鍜岄氳繃鏁e垪瀵嗙爜鐩存帴浠ユ枃鏈艦寮忎繚瀛樼瓑錛岀洰鍓?
騫挎硾浣跨敤鐨勭畻娉曟湁MD4銆丮D5銆丼HA-1.
娑堟伅鎽樿鏈変袱涓熀鏈睘鎬э細
涓や釜涓嶅悓鐨勬姤鏂囬毦浠ョ敓鎴愮浉鍚岀殑鎽樿闅句互瀵規寚瀹氱殑鎽樿鐢熸垚涓涓姤鏂囷紝鑰屽彲浠ョ敱璇ユ姤鏂囧弽鎺ㄧ畻鍑鴻鎸囧畾鐨勬憳瑕佷唬琛細緹庡浗鍥藉鏍囧噯鎶鏈爺絀舵墍鐨凷HA1鍜岄夯鐪佺悊宸ュ闄onald Rivest鎻愬嚭鐨凪D5
錛堜簩錛夊瀛楃涓茶繘琛屽姞瀵?/strong>
/** *//**鍒╃敤MD5榪涜鍔犲瘑
* @param str 寰呭姞瀵嗙殑瀛楃涓?br />
* @return 鍔犲瘑鍚庣殑瀛楃涓?br />
* @throws NoSuchAlgorithmException 娌℃湁榪欑浜х敓娑堟伅鎽樿鐨勭畻娉?br />
* @throws UnsupportedEncodingException
*/
public String EncoderByMd5(String str) throws NoSuchAlgorithmException,
UnsupportedEncodingException...{
//紜畾璁$畻鏂規硶
MessageDigest md5=MessageDigest.getInstance("MD5");
BASE64Encoder base64en = new BASE64Encoder();
//鍔犲瘑鍚庣殑瀛楃涓?br />
String newstr=base64en.encode(md5.digest(str.getBytes("utf-8")));
return newstr;
}
璋冪敤鍑芥暟錛歋tring str="0123456789"
System.out.println錛圗ncoderByMd5錛坰tr錛夛級錛?/p>
杈撳嚭錛歟B5eJF1ptWaXm4bijSPyxw==
錛堜笁錛夐獙璇佸瘑鐮佹槸鍚︽紜?/strong>
鍥犱負MD5鏄熀浜庢秷鎭憳瑕佸師鐞嗙殑錛屾秷鎭憳瑕佺殑鍩烘湰鐗瑰緛灝辨槸寰堥毦鏍規嵁鎽樿鎺ㄧ畻鍑烘秷鎭姤鏂囷紝鍥犳瑕侀獙璇佸瘑鐮佹槸鍚︽紜紝灝卞繀欏誨杈撳叆瀵嗙爜錛堟秷鎭姤鏂囷級閲嶆柊璁$畻鍏?
鎽樿錛屽拰鏁版嵁搴撲腑瀛樺偍鐨勬憳瑕佽繘琛屽姣旓紙鍗蟲暟鎹簱涓瓨鍌ㄧ殑鍏跺疄涓虹敤鎴峰瘑鐮佺殑鎽樿錛夛紝鑻ヤ袱涓憳瑕佺浉鍚岋紝鍒欒鏄庡瘑鐮佹紜紝涓嶅悓錛屽垯璇存槑瀵嗙爜閿欒銆?br />
/** *//**鍒ゆ柇鐢ㄦ埛瀵嗙爜鏄惁姝g‘
* @param newpasswd 鐢ㄦ埛杈撳叆鐨勫瘑鐮?br />
* @param oldpasswd 鏁版嵁搴撲腑瀛樺偍鐨勫瘑鐮侊紞錛嶇敤鎴峰瘑鐮佺殑鎽樿
* @return
* @throws NoSuchAlgorithmException
* @throws UnsupportedEncodingException
*/
public boolean checkpassword(String newpasswd,String oldpasswd) throws NoSuchAlgorithmException,
UnsupportedEncodingException...{
if(EncoderByMd5(newpasswd).equals(oldpasswd))
return true;
else
return false;
}
]]>java 鑾峰彇鏂囦歡澶瑰ぇ灝忥紝鏂囦歡澶у皬錛屾枃浠朵釜鏁?娉細杞澆浜巋ttp://blog.sina.com.cn/s/blog_45096c6a0100btse.html) http://m.tkk7.com/anchor110/articles/341284.html灝忎竴璐ユ秱鍦?/dc:creator>灝忎竴璐ユ秱鍦?/author>Tue, 21 Dec 2010 16:18:00 GMT http://m.tkk7.com/anchor110/articles/341284.html http://m.tkk7.com/anchor110/comments/341284.html http://m.tkk7.com/anchor110/articles/341284.html#Feedback 2 http://m.tkk7.com/anchor110/comments/commentRss/341284.html http://m.tkk7.com/anchor110/services/trackbacks/341284.html package tony;
import java.io.File;
import java.text.DecimalFormat;
import java.io.FileInputStream;
public class GetFileSize
{
public long
getFileSizes(File f) throws Exception{//鍙栧緱鏂囦歡澶у皬
long s=0;
if (f.exists()) {
FileInputStream fis = null;
fis = new FileInputStream(f);
s= fis.available();
} else {
f.createNewFile();
System.out.println("鏂囦歡涓嶅瓨鍦?);
}
return s;
}
// 閫掑綊
public long
getFileSize(File f)throws Exception//鍙栧緱鏂囦歡澶瑰ぇ灝?br />
{
long size = 0;
File flist[] = f.listFiles();
for (int i = 0; i < flist.length; i++)
{
if (flist[i].isDirectory())
{
size = size + getFileSize(flist[i]);
} else
{
size = size + flist[i].length();
}
}
return size;
}
public
String FormetFileSize(long fileS) {//杞崲鏂囦歡澶у皬
DecimalFormat df = new DecimalFormat("#.00");
String fileSizeString = "";
if (fileS < 1024) {
fileSizeString = df.format((double) fileS) + "B";
} else if (fileS < 1048576) {
fileSizeString = df.format((double) fileS / 1024) + "K";
} else if (fileS < 1073741824) {
fileSizeString = df.format((double) fileS / 1048576) + "M";
} else {
fileSizeString = df.format((double) fileS / 1073741824) +
"G";
}
return fileSizeString;
}
public long
getlist(File f){//閫掑綊姹傚彇鐩綍鏂囦歡涓暟
long size = 0;
File flist[] = f.listFiles();
size=flist.length;
for (int i = 0; i < flist.length; i++) {
if (flist[i].isDirectory()) {
size = size + getlist(flist[i]);
size--;
}
}
return size;
}
public
static void main(String args[])
{
GetFileSize g = new GetFileSize();
long startTime = System.currentTimeMillis();
try
{
long l = 0;
String path = "C:\\WINDOWS";
File ff = new File(path);
if (ff.isDirectory()) { //濡傛灉璺緞鏄枃浠跺す鐨勬椂鍊?br />
System.out.println("鏂囦歡涓暟
" + g.getlist(ff));
System.out.println("鐩綍");
l = g.getFileSize(ff);
System.out.println(path + "鐩綍鐨勫ぇ灝忎負錛? + g.FormetFileSize(l));
} else {
System.out.println("
鏂囦歡涓暟
1");
System.out.println("鏂囦歡");
l = g.getFileSizes(ff);
System.out.println(path + "鏂囦歡鐨勫ぇ灝忎負錛? + g.FormetFileSize(l));