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

ÓÃjava±àд¶àÏß³Ìftp¶ÏµãÏÂÔØÎļþ³ÌÐò


×÷Õß
:
ÀîÖ¾ÌÎ
ÓÊÏäµØÖ·
:lizhitao67116961@163.com
ÉîÛÚÓÅÍø¿Æ¼¼ÓÐÏÞ¹«Ë¾
 
Ç°¼¸Ìì¿´µ½ÓÐijλÍøÓÑдÁËÓÃhttp½øÐжϵãÏÂÔØÎļþ£¬µ«ÊÇÍøÉÏûÓп´µ½ftp¶ÏµãÏÂÔصÄÎÄÕ»ò´úÂ룬ÏÖÔÚ±¾ÈËдÁËһϡ£¾­¹ý²âÊÔûÓÐÎÊÌâ¡£Çë´ó¼Ò¶à¶àÖ¸½Ì¡£ÈçÓÐÊ詵ĵط½Çë¸÷λ¼¼ÊõÓÑÈËÖ¸³ö¡£±¾È˲»Ê¤¸Ð¼¤¡£
 
package
test.download;
 
import
java.io.File;
import
java.io.FileNotFoundException;
import
java.io.FileOutputStream;
import
java.io.IOException;
import
java.io.InputStream;
import
java.io.RandomAccessFile;
import
java.net.SocketException;
import
java.util.concurrent.CountDownLatch;
import
java.util.concurrent.ExecutorService;
import
java.util.concurrent.Executors;
 
import
org.apache.commons.net.ftp.FTPClient;
import
org.apache.commons.net.ftp.FTPClientConfig;
import
org.apache.commons.net.ftp.FTPFile;
import
org.apache.commons.net.ftp.FTPReply;
import
org.apache.log4j.Logger;
 
import
util.LogMgr;
 
public

class
TestProtocolFtp {
 
   
private
FTPClient
FTP
;
   
private
String
host
;
   
private

int

port
;
   
private
String
user
;
   
private
String
pwd
;
   
private
String
taskdate
;
   
private

boolean

forceexit
;
 
   
private

static
Logger
log
=
LogMgr.getInstance
().getSystemLogger();
 
   
public
String toString() {
      
return

host
+
":"
+
port
+
"@"
+
user
+
"/"
+
pwd
;
   
}
 
   
public

boolean
Login(String strHost,
int
nPort, String strUser,
          
String
strPwd) {
      
host
= strHost;
      
port
= nPort;


Ïà¹ØÎĵµ£º

java ´úÂëʵÏÖƽºâ¶þ²æÊ÷

/**
 * ƽºâ¶þ²æËÑË÷£¨ÅÅÐò£©Ê÷
 *
 * ƽºâ¶þ²æËÑË÷Ê÷Ë«³ÆΪAVLÊ÷£¬ËüÒ²ÊÇÒ»¿Ã¶þ²æËÑË÷Ê÷£¬ÊǶԶþ²æËÑË÷Ê÷µÄÒ»ÖָĽø£¬»ò¶¼ÊǾßÓÐÏÂÁÐÐÔÖʵĶþ²æÊ÷£ºËü
 * µÄ×ó×ÓÊ÷ºÍÓÒ×ÓÊ÷¶¼ÊÇƽºâ¶þ²æÊ÷£¬ÇÒ×ó×ÓÊ÷ºÍÓÒ×ÓÊ÷µÄÉî¶ÈÖ®²îµÄ¾ø¶ÔÖµ²»³¬¹ý1¡£
 *
 * ƽºâÒò×Ó£¨Balance Factor,BF£©¶¨ÒåΪ ......

Java zip ½âѹËõAPI

²ÎÊý˵Ã÷
fileName£º ±íʾÏë½âѹµÄÎļþÃû   È磺c:\\aaa\a.zip
unZipDir£º  ±íʾÏë½âѹµ½µÄ·¾¶   È磺c:\\ccc
public static void unZip1(String fileName, String unZipDir) {
        try {
            Fil ......

Java Serializable(ÐòÁл¯£©µÄÀí½âºÍ×ܽá

1¡¢ÐòÁл¯ÊǸÉʲôµÄ£¿
       ¼òµ¥Ëµ¾ÍÊÇΪÁ˱£´æÔÚÄÚ´æÖеĸ÷ÖÖ¶ÔÏóµÄ״̬£¨Ò²¾ÍÊÇʵÀý±äÁ¿£¬²»ÊÇ·½·¨£©£¬²¢ÇÒ¿ÉÒ԰ѱ£´æµÄ¶ÔÏó״̬ÔÙ¶Á³öÀ´¡£ËäÈ»Äã¿ÉÒÔÓÃÄã×Ô¼ºµÄ¸÷ÖÖ¸÷ÑùµÄ·½·¨À´±£´æobject states£¬µ«ÊÇJava¸øÄãÌṩһÖÖÓ¦¸Ã±ÈÄã×Ô¼ººÃµÄ±£´æ¶ÔÏó״̬µÄ»úÖÆ£¬ÄǾÍÊÇÐòÁл¯¡£
2¡¢Ê²Ã´Çé¿öÏ ......

JavaÈí¼þ¼Ü¹¹Ê¦ÐèÒªµÄ¶«Î÷

×÷ΪJava³ÌÐòÔ±À´Ëµ£¬×îÍ´¿àµÄÊÂÇéĪ¹ýÓÚ¿ÉÒÔÑ¡ÔñµÄ·¶Î§Ì«¹ã£¬¿ÉÒÔ¶ÁµÄÊéÌ«¶à£¬ÍùÍùÈÝÒ×ÎÞËùÊÊ´Ó¡£¸ù¾ÝÎҵľ­Ñ飬°´ÕÕѧϰµÄÏȺó˳Ðò£¬ÍƼö¸ø´ó¼Ò£¬ÌرðÊÇÄÇЩÏë²»¶ÏÌá¸ß×Ô¼º¼¼ÊõˮƽµÄJava³ÌÐòÔ±ÃÇ¡£
 
Ò»¡¢Java±à³ÌÈëÃÅÀà
 
¶ÔÓÚûÓÐJava±à³Ì¾­ÑéµÄ³ÌÐòÔ±ÒªÈëÃÅ£¬Ëæ±ã¶ÁʲôÈëÃÅÊé¼®¶¼Ò»Ñù£¬Õâ¸ö½×¶ÎÐèÒªÄã ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ