Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaʵÏÖʹÓôúÀí·þÎñÆ÷´´½¨URLÁ¬½Ó


¶ÔÓÚ Java 1.2£¬ÄúÖ»ÐèÓÃ
Authenticator.setDefault() °²×°Ò»¸ö Authenticator¡£ÕâÑù£¬µ±ÐèÒªÈÏ֤ʱ£¬ÒÑ°²×°µÄ Authenticator µÄ
getPasswordAuthentication() ·½·¨¾Í»á±»µ÷Óã¬È»ºóÄú¾Í¿ÉÒÔÓÃÊʵ±µÄÓû§ÃûºÍ¿ÚÁîÀ´ÉèÖà PasswordAuthentication ʵÀý¡£¾ÍÕâô¼òµ¥¡£ 
 
package
cn.arthurs.web;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.util.Properties;
import org.apache.log4j.Logger;
public class WebUnit {
 private static final Logger log = Logger.getLogger( WebUnit.class );
 
 /**
  * ·µ»ØÒ»¸öÍøÕ¾µÄÔ´´úÂë,ÐèÒª´«ÈëÒ»¸öÍøÕ¾µÄÍøÖ·
  * @param webUrl
  * @return
  */
 public static String getWebContent(String webUrl){
  URL url;
  HttpURLConnection conn;
  InputStream stream;
  StringBuffer  text  =  new  StringBuffer();
  String temp="";
  try {
   url = new URL(webUrl);
   
   //Èç¹ûÐèÒª´úÀí·þÎñÆ÷
   if(false){
      Properties prop =
System.getProperties();        
      // ÉèÖÃhttp·ÃÎÊҪʹÓõĴúÀí·þÎñÆ÷µÄµØÖ·           
      prop.setProperty("http.proxyHost",
"bmcdc.bmsa.com");        
      // ÉèÖÃhttp·ÃÎÊҪʹÓõĴúÀí·þÎñÆ÷µÄ¶Ë¿Ú           
      prop.setProperty("http.proxyPort",
"1865");        
      // ÉèÖò»ÐèҪͨ¹ý´úÀí·þÎñÆ÷


Ïà¹ØÎĵµ£º

¼ÇÒ»£ºJavaÖ®¿ÉÊÓ»¯½çÃæswingÉè¼Æ

     ÔÚÍøÉÏÕÒµÄһЩ×ÊÁÏ~~Ïë´æÆðÀ´~~·½±ãÒÔºó²é¿´
ѧϰJava SwingͼÐλ¯±à³Ì£¬ÎÒÃÇÊ×ÏÈÒªÁ˽âÈý¸ö×î»ù±¾µÄ¸ÅÄ¶¥²ãÈÝÆ÷£¬¿Ø¼þ£¬²¼¾Ö¡£
ÏÂÃæ¾ÍÀ´½éÉÜÒ»ÏÂÕâÈý¸ö»ù±¾¸ÅÄî
1.¶¥²ãÈÝÆ÷
ʲôÊǶ¥²ãÈÝÆ÷£¿µ±ÎÒÃÇʹÓÃJava½øÐÐͼÐαà³ÌµÄʱºò£¬Í¼ÔÚÄÄÀï»æÖÆÄØ£¿ÎÒÃÇÐèÒªÒ»¸öÄܹ»ÌṩͼÐλæÖƵÄÈÝÆ÷£¬ ......

JavaÖеÄÉÖÆÓëdz¸´ÖÆ

1£®Ç³¸´ÖÆÓëÉÖƸÅÄî
¢Ådz¸´ÖÆ£¨Ç³¿Ë¡£©
±»¸´ÖƶÔÏóµÄËùÓбäÁ¿¶¼º¬ÓÐÓëÔ­À´µÄ¶ÔÏóÏàͬµÄÖµ£¬¶øËùÓеĶÔÆäËû¶ÔÏóµÄÒýÓÃÈÔȻָÏòÔ­À´µÄ¶ÔÏó¡£»»ÑÔÖ®£¬Ç³¸´Öƽö½ö¸´ÖÆËù¿¼ÂǵĶÔÏ󣬶ø²»¸´ÖÆËüËùÒýÓõĶÔÏó¡£
 
¢ÆÉÖÆ£¨Éî¿Ë¡£©
±»¸´ÖƶÔÏóµÄËùÓбäÁ¿¶¼º¬ÓÐÓëÔ­À´µÄ¶ÔÏóÏàͬµÄÖµ£¬³ýÈ¥ÄÇЩÒýÓÃÆäËû¶ÔÏóµÄ±äÁ¿¡ ......

ubuntuÏ£¬C/C++ͨ¹ýJNIµ÷Óà JAVAÀà

֮ǰд¹ýÒ»¸öʵÏÖÁËijÖÖ¹¦ÄܵÄjava³ÌÐò£¬µ«ÓÉÓÚ½üÈÕ“¹¤×÷”ÐèÒª£¬ÓÖÐèÒªÔÚc/c++ÖÐÖØÐÂʹÓøù¦ÄÜ¡£ÎªÁ˽Úʡʱ¼ä£¬ÎÒ²ÉÈ¡ÁËÔÚc/c++Öе÷ÓÃjava³ÌÐòµÄ·½·¨£¬µ«Ö®Ç°Ã»ÓнӴ¥¹ýÀàËƵĶ«Î÷£¬µ½ÍøÉÏÒ»²é£¬¹ûÈ»ÓÐÀàËƵĶ«Î÷£¬ÐÄÖаµÏ²ing...¡£²éµ½µÄ×ÊÁÏÖÐÓм¸¸ö²»´íµÄÍøÒ³£º
      &nbs ......

JAVA×Ô¶¯×°ÏäÓë²ðÏä

×Ô¶¯×°ÏäÓë²ðÏäµÄ¹¦ÄÜÊÂʵÉÏÊDZàÒëÆ÷À´°ïÄúµÄ棬±àÒëÆ÷ÔÚ±àÒëʱÆÚÒÀÄúËù±àдµÄÓï·¨£¬¾ö¶¨ÊÇ·ñ½øÐÐ×°Ïä»ò²ðÏ䶯×÷¡£ÀýÈ磺
Integer i = 100.Ï൱ÓÚ±àÒëÆ÷×Ô¶¯ÎªÄú×÷ÒÔϵÄÓï·¨±àÒ룺
Integer i = new Integer(100).ËùÒÔ×Ô¶¯×°ÏäÓë²ðÏäµÄ¹¦ÄÜÊÇËùνµÄ“±àÒëÆ÷ÃÛÌÇ”(Compiler Sugar)£¬ËäȻʹÓÃÕâ¸ö¹¦Äܷܺ½±ã£¬µ ......

java¿ì½Ý¼ü

Ctrl+1 ¿ìËÙÐÞ¸´(×î¾­µäµÄ¿ì½Ý¼ü,¾Í²»Óöà˵ÁË)
Ctrl+D: ɾ³ýµ±Ç°ÐÐ
Ctrl+Alt+↓ ¸´ÖƵ±Ç°Ðе½ÏÂÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Ctrl+Alt+↑ ¸´ÖƵ±Ç°Ðе½ÉÏÒ»ÐÐ(¸´ÖÆÔö¼Ó)
Alt+↓ µ±Ç°ÐкÍÏÂÃæÒ»Ðн»»¥Î»ÖÃ(ÌرðʵÓÃ,¿ÉÒÔÊ¡È¥ÏȼôÇÐ,ÔÙÕ³ÌùÁË)
Alt+↑ µ±Ç°ÐкÍÉÏÃæÒ»Ðн»»¥Î»ÖÃ(ͬÉÏ)
Alt+← Ç°Ò»¸ö±à¼­µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ