JavaÍøÂç±à³Ì1
InetAddressÀà´ú±íIPµØÖ·£¬ÓÐÁ½¸ö×ÓÀ࣬Inet4Address£¬Inet6Address´ú±íIPV4ºÍIPv6£¬Ã»Óй¹Ôì·½·¨£¬µ«ÊÇÌṩ¸öÁËÁ½¸ö¾²Ì¬·½·¨À´»ñÈ¡InetAddressʵÀý£ºgetByName(String host):¸ù¾ÝÖð¾ä»ñÈ¡¶ÔÓ¦µÄInetAddress¶ÔÏó£»getByAddress(byte[]addr):¸ù¾ÝÔʼIPµØÖ·À´»ñÈ¡¶ÔÓ¦µÄInetAddress¶ÔÏó.
String getCanonicalHostName()£º»ñÈ¡´ËIPµØÖ·µÄÈ«ÏÞ¶¨ÓòÃû
String getHostAddress():·µ»Ø¸ÃInetAddressʵÀý¶ÔÓ¦µÄIPµØÖ·×Ö·û´®
String getHostName():»ñÈ¡´ËIPµØÖ·µÄÖ÷»úÃû
Boolean isReachable():²âÊÔÊÇ·ñ¿ÉÒÔµ½´ï¸ÃµØÖ·
URLDecoder ºÍURLEncoderÓÃÓÚÆÕͨ×Ö·û´®ºÍapplication/x-www-form-urlencoded MIME×Ö·û´®Ö®¼äµÄÏ໥ת»»¡£
URLDecoderµÄdecode(String s,String enc)¾²Ì¬·½·¨£¬Ëû¿ÉÒÔ½«¿´ÉÏÈ¥ÂÒÂëµÄÌØÊâ×Ö·ûת»»³ÉÆÕͨ×Ö·û´®
URLEncoderµÄencode(String s,String enc)¾²Ì¬·½·¨£¬Ëû¿ÉÒÔ½«ÆÕͨ×Ö·û´®×ª»»³Éapplication/x-www-form-urlencoded MIME×Ö·û´®
URLºÍURLConnection
URL url=new URL("http://doc.mysql.cn/download/chm/refman-5.1.mysql.tar.gz");
URLConnection conn=url.openConnection();
Ò»¸öÏÂÔØ×ÊÔ´µÄÏ̳߳ÌÐò
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
public class DownThread extends Thread {
// ¶¨Òå×Ö½ÚÊý×éµÄ³¤¶È
private final static int BUFFER_LEN = 32;
// ¶¨ÒåÏÂÔØµÄÆðµã
private long start;
// ¶¨ÒåÏÂÔØµÄ½áÊøµã
private long end;
// ¶¨ÒåÏÂÔØ×ÊÔ´¶ÔÓ¦µÄÊäÈëÁ÷
private InputStream is;
// ½«ÏÂÔØµÄ×Ö½ÚÊä³ö
private RandomAccessFile raf;
public DownThread(long start, long end, InputStream is,
RandomAccessFile raf) {
super();
//Êä³ö¸ÃÏ̸߳ºÔðÏÂÔØµÄ×Ö½ÚλÖÃ
System.out.println(start+"---->"+end);
this.start = start;
this.end = end;
this.is = is;
this.raf = raf;
}
publi
Ïà¹ØÎĵµ£º
Javaѧϰ´ÓÈëÃŵ½¾«Í¨
Ò»¡¢ JDK (Java Development Kit)
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......
ExcelµÄbook±£»¤ÊǺܳ£Óõģ¬Ö÷ÒªÊDz»ÏëÈñðÈËÐÞ¸ÄExcelµÄʱºòÓá£ÕâÑùÄܹ»±ÜÃâ¶ñÒâËæ±ãÐÞ¸ÄÊý¾Ý£¬Ìá¸ßÊý¾ÝµÄ¿ÉÐжȡ£
ÄÇôJAVAÀ´ÊµÏÖÉèÖÃbook±£»¤Ôõô×öÄØ£¿
²éÕÒÁ˼¸ÖÖ³£¼ûµÄJAVA²Ù×÷ExcelµÄһЩ°ü£¬´óÌå½á¹ûÈçÏ£º
1. POI
&nbs ......
Ò»£ºJ2SE ÃæÏò¶ÔÏó£·â×°¡¢¼Ì³Ð¡¢¶à̬
ÄÚ´æµÄ·ÖÎö
µÝ¹é
¼¯ºÏÀà¡¢·ºÐÍ¡¢×Ô¶¯´ò°üÓë½â°ü¡¢Annotation
IO
¶àÏ̡߳¢Ïß³Ìͬ²½
TCP/UDP
AWT¡¢Ê¼þÄ£ÐÍ¡¢ÄäÃûÀà
ÕýÔò±í´ïʽ
·´Éä»úÖÆ
2£ºÊý¾Ý¿â£¨Oracle»òÕßMySQL£©
SQLÓï¾ä
¶à±íÁ¬½Ó£¬ÄÚÍâÁ¬½Ó£¬ ×Ó²éѯµÈ
¹ÜÀí±í¡¢ÊÓͼ¡¢Ë÷Òý¡¢ÐòÁС¢Ô¼ÊøµÈ
Ê÷×´½á¹¹´æ´¢
´æ´¢¹ý ......
±¾ÏîÄ¿Óõ½µÄ¼¼ÊõÊÇssh£¬ajax¿ò¼Üdwr£¬¹¤×÷Á÷µÈ
Óöµ½µÄÎÊÌâÊÇÒµÎñÁ÷³Ì²»ÊìϤ£¬¼¼ÊõÉϺÍÍŶӳÉÔ±ÓÐЩ²î¾à£¨µ«ÎÒÏàÐÅ×Ô¼º»áÍê³ÉÈÎÎñ£©
sqlÓï¾äµÄ±àд
˼·ÎÊÌ⣬ֻҪÓÐ˼·£¬¾Í»áÓз½·¨£¬×öÈí¼þÒ²ÐèÒªÆæË¼ÃîÏë°¡¹þ¹þ£»
¿ª·¢¹ý³ÌÒ²ÊDz»¶ÏѧϰµÄ¹ý³Ì£»
×î½üÓöµ½ÁËÒ»¸ösessionºÍdatabase²»Í¬²½µÄÎÊÌ⣬½â¾öµÄ·½·¨Êǽ« ......
10.2.4.3 Àý×Ó3£ºÍøÂçÓ¦ÓòãÐÒéµÄ¿ª·¢
Ç廪´óѧ³ö°æÉç¡¶Java³ÌÐòÔ±£¬ÉϰàÄǵãʶù¡·×÷ÕߣºÖÓÉù——µÚ10Õ¡¶¸ßÊÖÓжà¸ß²ËÄñÓжà²Ë¡·²¿·Ö½ÚÑ¡¡£
´ó¼ÒÒ²Ðí¶¼ÓùýFTPÉÏ´«ÏÂÔØ¹¤¾ß£¬±ÈÈç“LeapFTP”Õâ¸ö¹¤¾ßÊÇÒ ......