java Ä£Äâä¯ÀÀÆ÷
public static void DownLoadPages(String urlStr, String outPath)
{
int chByte = 0;
URL url = null;
HttpURLConnection httpConn = null;
InputStream in = null;
FileOutputStream out = null;
try
{
url = new URL(urlStr);
httpConn = (HttpURLConnection) url.openConnection();
HttpURLConnection.setFollowRedirects(true);
httpConn.setRequestMethod("GET");
httpConn.setRequestProperty("User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows 2000)");
// logger.info(httpConn.getResponseMessage());
in = httpConn.getInputStream();
out = new FileOutputStream(new File(outPath));
chByte = in.read();
while (chByte != -1)
{
out.write(chByte);
&n
Ïà¹ØÎĵµ£º
java ´úÂë
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList; ......
˵À´Í´¿à£¬¹ØÓÚjava°ü½á¹¹£¬´ò°ü£¬±àÒ룬ÔËÐеÄ֪ʶ£¬ÎÒÊÇѧÁËÍü£¬ÍüÁËѧ¡£ËäÈ»¾ø´ó²¿·Ö¿ª·¢»ùÓÚ¶ÔIDEµÄʹÓ㬲¢ÇÒºÜˬ£¬µ«Ã¿´Î»Ø¹éÃüÁîÐÐģʽʱ£¬ÓÉÓÚȱ·¦¶Ôjava°ü½á¹¹¡¢´ò°ü¡¢±àÒë¡¢ÔËÐÐÏà¹ØµÄ֪ʶ×ܽἰÊìÁ·ÔËÓ㬿Éν´ç²½ÄÑÐÐ
ÍøÉÏËäȻɢ²¼ºÜ¶à¹ØÓÚÕâ·½ÃæµÄÂÛÊö£¬µ«×ܸоõ²»·ûºÏÎÒµÄÇÐÉíʵ¼Ê
¿´À´£¬×Ô¼º¶¯ÊÖ¹éÄÉ×ܽᣠ......
¶¨Ò嶯̬´úÀíÀàDynamicProxy
package com.zte.adc.common;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class DynamicProxy implements InvocationHandler {
private Object object;
// °ó¶¨¹Øϵ£¬Ò²¾ÍÊǹØÁªµ½Äĸö½Ó¿Ú£¨Óë ......
Javaͨ¹ýXML SchemaУÑéXML
XMLµÄУÑéÔÚXML´¦ÀíÖзdz£³£¼û£¬Èç¹ûûÓÐÓÐЧµÄ°ì·¨À´Ð£ÑéXMLµÄºÏ·¨ÐÔ£¬ÍùÍù»áµ¼ÖºܶàÎÊÌâ¡£
XMLµÄУÑéÊÇͨ¹ýXML Schema£¨XSD£© »òDTDÎļþµÄÓï·¨¹æ·¶À´Ð£ÑéµÄ¡£DTDÏÖÔÚÔ½À´Ô½²»ÊÜ»¶ÓÁË£¬ÔÚ´ËÑ¡ÓÃXSDÀ´Ð£Ñé¡£
JavaУÑéXMLÊǼþºÍ³¶µµÄÊÂÇ飬ÒòΪSunµÄXMLÏà¹ØÈí¼þ°ü» ......
ÊÂÎñ´¦ÀíÊÇÆóÒµÓ¦ÓÃÐèÒª½â¾öµÄ×îÖ÷ÒªµÄÎÊÌâÖ®Ò»¡£J2EEͨ¹ýJTAÌṩÁËÍêÕûµÄÊÂÎñ¹ÜÀíÄÜÁ¦£¬°üÀ¨¶à¸öÊÂÎñÐÔ×ÊÔ´µÄ¹ÜÀíÄÜÁ¦¡£µ«ÊǴ󲿷ÖÓ¦Óö¼ÊÇÔËÐÐÔÚµ¥Ò»µÄÊÂÎñÐÔ×ÊÔ´Ö®ÉÏ£¨Ò»¸öÊý¾Ý¿â£©£¬ËûÃDz¢²»ÐèҪȫ¾ÖÐÔµÄÊÂÎñ·þÎñ¡£±¾µØÊÂÎñ·þÎñÒÑÈ»×ã¹»(±ÈÈçJDBCÊÂÎñ¹ÜÀí£©¡£
±¾ÎIJ¢²»ÌÖÂÛÓ¦¸Ã²ÉÓúÎÖÖÊÂÎñ´ ......