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

java»ñµÃÍøÒ³ÄÚÈÝ

Íøַץȡ Java API ¸ÅÊö
 
http://code.google.com/intl/zh-CN/appengine/docs/java/urlfetch/usingjavanet.html
App Engine Ó¦ÓóÌÐò¿ÉÒÔÓëÆäËûÓ¦ÓóÌÐò½øÐÐͨÐÅ»òͨ¹ýץȡÍøÖ··ÃÎÊÍøÂçÉϵÄÆäËû×ÊÔ´¡£Ó¦ÓóÌÐò¿ÉÒÔʹÓÃÍøַץȡ·þÎñÀ´·¢³ö HTTP ºÍ HTTPS ÇëÇó²¢½ÓÊÕÏìÓ¦¡£³öÓÚЧÂʺÍÀ©Õ¹ÐÔ¿¼ÂÇ£¬Íøַץȡ·þÎñʹÓà Google µÄÍøÂç»ù´¡½á¹¹¡£
Óà java.net ץȡÍøÖ·
Ìá³öÇëÇó
°²È«Á¬½ÓºÍ HTTPS
ÇëÇó±êÍ·
ÏìÓ¦
ÁªÏµ¹«Ë¾·À»ðǽ֮ºóµÄÖ÷»ú
ÍøַץȡºÍ¿ª·¢·þÎñÆ÷
Åä¶îºÍÏÞÖÆ
Óà java.net ץȡÍøÖ·
Äú¿ÉÒÔʹÓà Java ±ê×¼¿âÖÐµÄ java.net.URLConnection ºÍÏà¹ØÀ࣬ͨ¹ý Java Ó¦ÓóÌÐò´´½¨ HTTP ºÍ HTTPS Á¬½Ó¡£App Engine ʹÓÃÍøַץȡ·þÎñʵÏִ˽ӿڣ»ÄúµÄÓ¦ÓóÌÐòûÓÐÖ±½Ó´´½¨Ì×½Ó×ÖÁ¬½Ó¡£
»ñȡijÍøÖ·µÄÒ³ÃæÄÚÈݵÄÒ»ÖÖ¼òµ¥·½·¨ÊÇ´´½¨ java.net.URL ¶ÔÏó£¬È»ºóµ÷ÓÃÆä openStream() ·½·¨¡£¸Ã·½·¨¿É´¦Àí´´½¨Á¬½ÓµÄÏêÇ飬·¢³ö HTTP GET ÇëÇó£¬È»ºó¼ìË÷ÏìÓ¦Êý¾Ý¡£
import java.net.MalformedURLException; 
import java.net.URL; 
import java.io.BufferedReader; 
import java.io.InputStreamReader; 
import java.io.IOException; 
 
// ... 
        try { 
            URL url = new URL("http://www.example.com/atom.xml"); 
            BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream())); 
            String line; 
 
            while ((line = reader.readLine()) != null) { 
                // ... 
            } 
            reader.close(); 
 
        } catch (MalformedURLException e) { 
            // ... 
        } catch (IOException e) { 
            // ... 
        }
¶ÔÓÚ¸ü¸´ÔÓµÄÇëÇó£¬Äú¿ÉÒÔµ÷ÓÃÍøÖ·¶ÔÏóµÄ openConnection() ·½·¨Ò


Ïà¹ØÎĵµ£º

Javaѧϰ·Ïßͼ£¬×¨ÎªÐÂÊÖ¶¨ÖƵÄJavaѧϰ¼Æ»®½¨Òé





ÔõôѧϰJava£¬ÕâÊǺܶàÐÂÊÖ¾­³£»áÎÊÎÒµÄÎÊÌ⣬ÏÖÔÚÎÒ¼òµ¥ÃèÊöÏÂÒ»¸öJava³õѧÕßµ½¾ÍҵҪѧµ½µÄһЩ¶«Î÷£º
   
Ê×ÏÈÒªÃ÷°×JavaÌåϵÉè¼Æµ½µÃÈý¸ö·½Ã棺J2SE,J2EE,J2ME£¨KJAVA£©¡£J2SE£¬Java 2 Platform Standard
Edition£¬ÎÒÃǾ­³£Ëµµ½µÄJDK£¬¾ÍÖ÷ÒªÖ¸µÄÕâ¸ö£¬ËüÊÇÈýÕߵĻù ......

java¹¤³§Ä£Ê½

ÃæÊÔÖÐÓöµ½µÄÎÊÌ⣬´ó¼Ò¹²Í¬Ñ§Ï°£¡£¡
Java¹¤³§Ä£Ê½
Java¹¤³§Ä£Ê½¿´ÁËÕâô¶à¹ØÓÚ¹¤³§Ä£Ê½µÄ½²½â£¬»¹ÊǾõµÃÕâƪÎÄÕ½²µÄºÃÀí½â£¬Ìù³öÀ´ºÍ´ó¼Ò·ÖÏí·ÖÏí¡£
Ò»¡¢Òý×Ó
»°ËµÊ®ÄêÇ°£¬ÓÐÒ»¸ö****»§£¬Ëû¼ÒÓÐÈýÁ¾Æû³µ——Benz±¼³Û¡¢Bmw±¦Âí¡¢Audi°ÂµÏ£¬»¹¹ÍÁË˾»úΪËû¿ª³µ¡£²»¹ý£¬****»§×ø³µÊ±×ÜÊǹֵֹģºÉÏBenz³µºó ......

ÀàµÄ°ü·ÃÎÊȨÏÞ£º¡¶Java±à³Ì˼Ïë¡·ÖÐÒ»¶Î»°µÄÀ§»ó

ÀàµÄ°ü·ÃÎÊȨÏÞ£º¡¶Java±à³Ì˼Ïë¡·ÖÐÒ»¶Î»°µÄÀ§»ó
 
  ÔÚ¡¶java±à³Ì˼ÏëµÚÈý°æ¡·£¨³Âê»Åô ÈÄÈô骵ÈÒ룩µÄµÚÎåÕÂÒþ²Ø¾ßÌåʵÏÖÖУ¬5.4½ÚµÄ×îºóÒ»¶Î»°ÊÇ£º
  “ÕýÈçÇ°ÃæËùÌáµ½µÄ£¬Èç¹ûûÄÜΪÀà·ÃÎÊȨÏÞÖ¸¶¨Ò»¸ö·ÃÎÊÐÞÊηû£¬Ëü¾Í»áȱʡµÃµ½°ü·ÃÎÊȨÏÞ¡£ÕâÒâζןÃÀàµÄ¶ÔÏó¿ÉÒÔÓÉ°üÄÚÈκÎÆäËûÀàÀ´´´½¨£ ......

java »ñȡʱ¼äÀà

 public String getCheckDateString(String str) {
        Date date = new Date();//»ñÈ¡µ±Ç°ÏµÍ³ÈÕÆÚ
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");//ʱ¼ä¸ñʽ
       ......

¶¯Ì¬Éú³ÉjavaÎļþµÄ·½·¨

package com.hongsoft.test;
import java.io.*;
//¶¨ÖƵÄÀà×°ÈëÆ÷
public class TestCompile extends ClassLoader
{
String _compiler;
String _classpath;
public static void main(String[] args)
{
new TestCompile();
}
public TestCompile()
{
super(ClassLoader.getSystemClassLoader());
//ĬÈϱàÒëÆ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ