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" ;
        }
   
}
 
    
     
	
	
    
    
	Ïà¹ØÎĵµ£º
        
    
    javaÉè¼ÆÄ£Ê½Ñ§Ï°1££Singleton Pattern
¡¡¡¡Ç°Ð©Ìì°ÚŪjava£¬²Î¿¼Ò»Ð©×ÊÁÏдÁ˸öÊý¾Ý¿âÁ¬½Ó³Ø£¬¶ÔÀïÃæÖ»²úÉúÒ»¸öʵÀýµÄÄÇÖÖ×ö·¨Éî±íÅå·þ£¬½ñÌìÖÐÎçÓÖÌýµ½±ðÈËÔÚ˵Éè¼ÆÄ£Ê½£¬Êܲ»ÁËÁË£¬¾ÍÉÏÍøDownÁ˵ã×ÊÁÏÀ´¡£
¡¡¡¡Ò»À´¾Í¿´µ½ÁËSingletonģʽ£¬Ò»¿´£¬Ñ½£¬²»¾ÍÊÇÄǸöÁ¬½Ó³ØÀïÓõķ½·¨Ã´?!àÞ£¬ÔÀ´Èç´Ë¡£
¡¡¡¡Singleton Ê ......
	
    
        
    
          ÔÎĵØÖ·£ºhttp://www.javaeye.com/topic/626801     Ò»Ö±ÔÞ̾Sun¶Ô´ý¼¼ÊõµÄÑϽ÷ºÍÓÅÑÅ£¨¿ÉÁ¯µÄSun£©¡£Sun JDKÖÐJava¿âµÄÔ´´úÂ룬Á¬×¢ÊͶ¼ÇåÇå³þ³þ¡¢¹æ¹æ·¶·¶£¬javadoc×¢½âµÄʹÓÃҲһ˿²»¹¶£¬¶ÁÆðÀ´ºÜÊìÊæ·þ¡£Òò´Ë£¬ÔÚÈÕ³£¹¤×÷ºÍѧϰÖУ¬¾³£¶Á¶Á Java¿âµÄÔ´´úÂ룬²»ÒàÀÖºõ£¿Èç¹ûÓöµ½¹îÒìÎÊÌ⣬Դ´úÂë ......
	
    
        
    
    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 ......
	
    
        
    
    ÏÈÌùÒ»¶Î
Java
»ù±¾½á¹¹
Java
½á¹¹°üÀ¨Ëĸö²»Í¬¶øÓÖÏà¹ØµÄ²¿·Ö£º
Java
ÓïÑÔ¡¢
class
Îļþ¸ñʽ¡¢Ó¦ÓóÌÐò½Ó
¿Ú¡¢ÐéÄâ»ú
ÆäÖУ¬ÐéÄâ»úµÄÖ÷ÒªÈÎÎñÊÇÔÚ³ÌÐòÔËÐÐÖÐÐèÒªµÄʱºòµ÷ÓÃ
class
Îļþ²¢Ö´ÐÐÆäÖеÄ×Ö½ÚÂë¡£Ò»¸ö
Java
Ó¦
ÓÃÓÐÁ½ÖÖ
class loader
£º
the system class loader 
ºÍ
 class loader objects
 ......