JAVA ÅÀÍøÒ³ÓÃ ÀýÈç:http://www.126.com
/*
Function name: myGetHttpFile2
Description: ÅÀÍøÒ³ÓÃ
Input: URL ÀýÈç:http://www.126.com
Output: ×Ö·û´®,ÍøÒ³µÄHTML
*/
public String myGetHttpFile2(String url){
String authentication=null;
ArrayList al=new ArrayList();
String PageURL = url;
PageURL = url ;
ArrayList urlCollection=new ArrayList();
Hashtable ht=new Hashtable();
//´úÀí£¬Èç¹ûÒª´©¹ý´úÀí½«ÏÂÃæ×¢ÊÍÈ¡Ïû
//ht=System.getProperties();
//authentication = "Basic " + new sun.misc.BASE64Encoder().encode("´úÀíµÄÓû§:´úÀíµÄÃÜÂë".getBytes());
//ht.put("proxySet", "true");
//ht.put("proxyHost", "172.16.20.2");
//ht.put("proxyPort", "80");
String urlSource=PageURL;
StringBuffer htmlBuffer=new StringBuffer();
String returnStr=null;
int codeStart=0;
int codeEnd=0;
int linkCount=0;
String getURL=null;
String realURL=null;
String urlText=null;
int from=0;
int lenURL=0;
int firstLink=0;
int endLink=0;
boolean isNewsLink=false;
try
{
URL su = new URL (urlSource);
URLConnection conn = su.openConnection();
//conn.setRequestProperty("Proxy-Authorization", authentication);
InputStream imageSource=new URL(urlSource).openStream();
int ch;
while((ch=imageSource.read())>-1)
{
htmlBuffer.append((char)ch);
}
imageSource.close();
returnStr= new String(htmlBuffer);
returnStr=new String(returnStr.getBytes("ISO8859_1"),"GBK");
}
catch(Exception e)
{
}
if(returnStr!=null){
return returnStr ;
}else{
return "empty" ;
}
}
Ïà¹ØÎĵµ£º
jvm classLoader architecture£º
1. Bootstrap ClassLoader/Æô¶¯Àà¼ÓÔØÆ÷
Ö÷Òª¸ºÔðjdk_home/libĿ¼ÏµĺËÐÄ api »ò -Xbootclasspath Ñ¡ÏîÖ¸¶¨µÄjar°ü×°È빤×÷¡£
2. Extension ClassLoader/À©Õ¹Àà¼ÓÔØÆ÷
Ö÷Òª¸ºÔðjdk_home/lib/extĿ¼ÏµÄjar°ü»ò -Djava.ext.dirs Ö¸¶¨Ä¿Â¼ÏµÄjar°ü×°È빤×÷¡£
3 ......
1£®Hibernate¹¤×÷ÔÀí¼°ÎªÊ²Ã´ÒªÓã¿
ÔÀí£º
1.¶ÁÈ¡²¢½âÎöÅäÖÃÎļþ
2.¶ÁÈ¡²¢½âÎöÓ³ÉäÐÅÏ¢£¬´´½¨SessionFactory
3.´ò¿ªSesssion
4.´´½¨ÊÂÎñTransation
5.³Ö¾Ã»¯²Ù×÷
6.Ìá½»ÊÂÎñ
7.¹Ø±ÕSession
8.¹Ø±ÕSesstionFactory
ΪʲôҪÓãº
1. ¶ÔJDB ......
´«ÖDz¥¿ÍJAVAÅàѵOAÏîÄ¿2010-5-12
½ñÌì»»Á˸öнÌÊÒ£¬ÖÕÓÚ½áÊøÁËÃÆÈÈµÄ¿ÕÆøÁË¡£ÒÔǰ½ÌÊÒ¿Õµ÷´ó´óµÄÓÐÎÊÌ⣬ÏÖÔÚºÃÁË£¬¿ÉÒÔÒ»Ïí¿Õµ÷µÄÁ¹Ë¬£¬Ö»²»ÊÇΨһÃÀÖв»×ãµÄÊÇ£¬¾ÓÈ»ÓõIJ»ÊǸñÁ¦¿Õµ÷¡£ÔÚ¸ñÁ¦¿Õµ÷´ôÁËËÄÄ꣬ËäÈ»ÔÚÄǶùûÓз¢»Ó³öÎÒ¸üºÃµÄˮƽ£¬µ«ÊÇÈ˱Ͼ¹ÊÇÓиÐÇéµÄ£¬ÎÒÒ²ºÜ°®ÄǸö¸ñÁ¦£¬´ó¹«Ë¾£¬´óÆøÆÇ£¬ÌرðÊÇ£¬ÎÒà ......
ÔÚwindows×ÀÃæÉÏÓÒ»÷“ÎҵĵçÄÔ” —> “ÊôÐÔ” —> “¸ß¼¶” —> “»·¾³±äÁ¿”£¬Ôړϵͳ±äÁ¿”ÀïÎÒÃÇ¿ÉÒÔ¿´µ½ÏµÍ³µÄ¸÷¸ö»·¾³±äÁ¿µÄÖµ¡£Ë«»÷ij¸ö±äÁ¿Ãû¿ÉÒÔÐ޸ıäÁ¿Öµ£¬±äÁ¿ÖµÖ®¼äÓÓ;”¸ô¿ª¡£ÎÒÃÇ»¹¿ÉÒԓн¨”ÔÏÈÃ»Ó ......
Ò»°ãÀ´Ëµ,ÎÒÃǰÑÕýÔÚ¼ÆËã»úÖÐÖ´ÐеijÌÐò½Ð×ö"½ø³Ì"(Process) ,¶ø²»½«Æä³ÆÎª³ÌÐò(Program)¡£Ëùν"Ïß³Ì"(Thread),ÊÇ"½ø³Ì"ÖÐij¸öµ¥Ò»Ë³ÐòµÄ¿ØÖÆÁ÷¡£ÐÂÐ˵IJÙ×÷ϵͳ,ÈçMac,Windows NT,Windows 95µÈ,´ó¶à²ÉÓöàÏ̵߳ĸÅÄî,°ÑÏß ³ÌÊÓΪ»ù±¾Ö´Ðе¥Î»¡£Ïß³ÌÒ²ÊÇJavaÖеÄÏàµ±ÖØÒªµÄ×é³É²¿·ÖÖ®Ò»¡£
ÉõÖÁ×î¼òµ¥µÄAppletÒ²ÊÇÓɶà¸öÏß ......