java ÏÂÔØÎļþµÄ·½·¨(2)
×òÌìÔÚдÍêjavaÏÂÔØµÄÎÄÕºó¾ÍÔÚ½ñÌì·¢ÏÖÁËÒ»¸öÎÊÌ⡣ͨ¹ýÕâ¸öÎÊÌâÒ²·´Ó¦³ö¶ÔHttpURLConnectionÕâ¸öÀ໹²»Á˽⡣³Ã´Ë»ú»áÔÙÌí¼ÓһЩ¶ÔÕâ¸öÀàµÄÁ˽â°É¡£Ê×ÏÈ¿´¿´Ç°ÃæÄǶϴúÂëÔÚÎҵijÌÐòÖгöÏÖÁËʲôÎÊÌ⣺
ÔÚÎҵijÌÐòÖÐÓÐÕâôһ¸öÄ£¿é£¬Í¨¹ý¸ø¶¨µÄurlÏÂÔØµ½Îļþ£¬±£´æµ½±¾µØ¡£¶øÎļþÊÇbinaryÐÎʽµÄ¡£ÀýÈ磺http://abc/li.exe,
ÓÃÏÂÃæ´úÂë»á³öÏÖÒ»¸öÎÊÌ⣬¾ÍÊǵ±Õâ¸öurl±»Öض¨Ïòµ½Ò»¸öÍøÒ³Ê±£¬ÏÂÔØÏÂÀ´µÄ¾ÍÊÇÍøÒ³µÄÄÚÈÝ£º
public static File saveToFiles(String destUrl,String path) throws IOException {
final int BUFFER_SIZE = 4096;
System.out.println("file download url is "+destUrl+" path is"+path+"--------------");
FileOutputStream fos = null;
BufferedInputStream bis = null;
HttpURLConnection httpconn = null;
URL url = null;
byte[] buf = new byte[BUFFER_SIZE];
int size = 0;
if(rc.isUseProxy()){ // ´Ë´¦Îª¶ÁÈ¡ÅäÖÃÎļþµÄÄÚÈÝ£¬È·¶¨ÊÇ·ñʹÓôúÀí
Properties prop = System.getProperties();
//set http proxy addr
prop.setProperty("http.proxyHost", rc.getHttpProxyHost()); &nbs
Ïà¹ØÎĵµ£º
1.´´½¨²âÊÔ±í
create table users(
userid int primary key,
username varchar2(20),
userpwd varchar2(20)
);
insert into users values(1,'test','test');
insert into users values(2,'test','test');
insert into users values(3,'test','test');
insert into users values(4,'test','test');
insert i ......
XSDÎļþ £¨XML Schema ÓïÑÔÒ²³Æ×÷ XML Schema ¶¨Ò壨XML Schema Definition£¬XSD£©¡£ ¾ßÌåʹÓ÷½·¨ºÍ¶¨ÒåÇë²Î¿´£º
http://www.w3school.com.cn/schema/index.asp
java×Ôjdk1.5ÒÔÉÏÐÂÔöÁËSchemaFactoryÀà ¿ÉÒÔʵÏÖ¶ÔXSDÑéÖ¤µÄÖ§³Ö£¬Ê¹ÓÃÆðÀ´Ò²ºÜ·½±ã¡£
ÒÔÏ´úÂë¿ÉÓÃÔÚJDK1.5+ ÑéÖ¤xml
public class SimpleErrorHandler i ......
Ãô½Ý¿ª·¢µÄÀíÄîÒѾÁ÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓÚά »¤£¬ÐèÒª½Ï´óµÄ²âÊÔͶÈëºÍÖÜÆÚµÈÎÊÌâ¡£ÕâЩÎÊÌâÔÚÒ»¸öÏ ......
1¡¢Âß¼ÔËËã·û == £¬ÔÚjavaÖÐÔËËã·û == ÊÇÓÃ×÷¶Ô±ÈÁ½¸ö¶ÔÏóµÄ±êʶÊÇ·ñÒ»Ñù£¬»òÕß¶ÔÓÚ»ù±¾ÀàÐͶøÑÔÊý¾ÝÖµÊÇ·ñÏàµÈ¡£»ù±¾ÀàÐͺͶÔÏóÊý¾ÝÖ®¼äÊDz»¿ÉÒÔÓÃÖ±½ÓÒâÒåÉϵıȽϣ¬javaÖвÉÓõÄÊǽ«¶ÔÏóÀàÐͲðÏ䣬¶øÔÚgroovyÖУ¬ÓÉÓÚ×Ô¶¯×°ÏäµÄ¹¦ÄÜ£¬Ò»Çж¼ÊǶÔÏó¡£ÒªÊ¹µÃ == ±È½ÏÓÐͨÓÃÐÔµÄÒâÒ壬groovyͨ¹ýequals()À´ÖØÔØ == Ô¤Ëã·û¡ ......
ÌáÆðJavaÄÚ²¿ÀࣨInner Class£©¿ÉÄܺܶàÈ˲»Ì«ÊìϤ£¬Êµ¼ÊÉÏÀàËÆµÄ¸ÅÄîÔÚC++ÀïÒ²ÓУ¬ÄǾÍÊÇǶÌ×ÀࣨNested Class£©£¬¹ØÓÚÕâÁ½ÕßµÄÇø±ðÓëÁªÏµ£¬ÔÚÏÂÎÄÖлáÓжԱȡ£ÄÚ²¿Àà´Ó±íÃæÉÏ¿´£¬¾ÍÊÇÔÚÀàÖÐÓÖ¶¨ÒåÁËÒ»¸öÀࣨÏÂÎĻῴµ½£¬ÄÚ²¿Àà¿ÉÒÔÔÚºÜ¶àµØ·½¶¨Ò壩£¬¶øÊµ¼ÊÉϲ¢Ã»ÓÐÄÇô¼òµ¥£¬Õ§¿´ÉÏÈ¥ÄÚ²¿ÀàËÆºõÓÐЩ¶àÓ࣬ËüµÄÓô¦¶ÔÓÚ³õ ......