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

java FTP²Ù×÷

 ¼òµ¥µÄдÁ˸öjava¶ÔftpµÄ²Ù×÷
ÓõÄÊÇcommons-net.jar°ü
FTPProxy.java
public class FTPProxy{
public FTPProxy()
{
super();
ftpClient = new FTPClient();
}
public FTPProxy(FTPBean entity)
{
this();
this.entity = entity;
}
private FTPBean entity;
private FTPClient ftpClient;
public void connection()
{
try
{
ftpClient.connect(entity.getServerIP());
ftpClient.login(entity.getUser(), entity.getPassword());
} catch (SocketException e)
{
e.printStackTrace();
} catch (IOException e)
{
e.printStackTrace();
}
}
public void download()
{
FileOutputStream fos = null;
try
{
String remoteFile = entity.getSrcFile();
String remoteFileName = "";
if (0 == remoteFile.lastIndexOf("/"))
{
remoteFileName = remoteFile.substring(remoteFile
.lastIndexOf("/") + 1);
} else if (0 < remoteFile.lastIndexOf("/"))
{
remoteFileName = remoteFile.substring(remoteFile
.lastIndexOf("/") + 1);
String path = remoteFile.substring(0, remoteFile
.lastIndexOf("/"));
ftpClient.changeWorkingDirectory(path);
} else
{
remoteFileName = remoteFile;
}
fos = new FileOutputStream(entity.getTargetFile());
ftpClient.setBufferSize(1024 * 8);
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
ftpClient.retrieveFile(remoteFileName, fos);
} catch (IOException e)
{
e.printStackTrace();
} finally
{
try
{
fos.close();
ftpClient.disconnect();
} catch (IOException e)
{
e.printStackTrace();
}
}
}
public void upload()
{
FileInputStream fis = null;
try
{
File srcFile = new File(entity.getSrcFile());
fis = new FileInputStream(srcFile);
ftpClient.setBufferSize(1024 * 8);
ftpClient.setControlEncoding("GBK");
String ftpPath = entity.getFtpPath();
if(null!=ftpPath&&!"".equals(ftpPath))
{
ftpClient.makeDirectory(ftpPath);
ftpClient.changeWo


Ïà¹ØÎĵµ£º

javaÖÐÏßÐÔ±í£¬Á´±í£¬¹þÏ£±íÊdz£ÓõÄÊý¾Ý½á¹¹

ÏßÐÔ±í£¬Á´±í£¬¹þÏ£±íÊdz£ÓõÄÊý¾Ý½á¹¹£¬ÔÚ½øÐÐJava¿ª·¢Ê±£¬JDKÒѾ­ÎªÎÒÃÇÌṩÁËһϵÁÐÏàÓ¦µÄÀàÀ´ÊµÏÖ»ù±¾µÄÊý¾Ý½á¹¹¡£ÕâЩÀà¾ùÔÚjava.util°üÖС£±¾ÎÄÊÔͼͨ¹ý¼òµ¥µÄÃèÊö£¬Ïò¶ÁÕß²ûÊö¸÷¸öÀàµÄ×÷ÓÃÒÔ¼°ÈçºÎÕýȷʹÓÃÕâЩÀà¡£    
   
  Collection  
  ©ÀList& ......

´«ÖDz¥¿ÍJAVAÅàѵ2010 4 29Lucene×ܽá


´«ÖDz¥¿ÍJAVAÅàѵ2010-4-29Lucene×ܽá
½ñÌìÐÄÇé²»´í£¬±±¾©µÄÌìÖÕÓÚ¶³öÁËÌ«ÑôÄÇ»¨¶ùÒ»°ãµÄÁ³µ°¶ù£¬ÐÄÇéÒ²²»ÓÉÒò´Ë¶øÉú³öϲÔã¬ÈË×ÜÊÇ»áÊÜ»·¾³µÄÓ°Ï죬ÏÂÎç»ØÀ´ÐÂÎÅÖÐÎÒ¿´µ½¹ã¶«ÄDZ߷¢ÉúµÄÊ£¬ÎÒÐÄÇé˵²»³öÀ´µÄ³ÁÖØ£¬ÎªÊ²Ã´ÕâЩÈ˲»ºÃºÃÕäϧÉú»îÄØ£¿ÎªÊ²Ã´ÒªÄÃÄÇЩÎÞ¹¼µÄСº¢×Ó³öÆø£¬°¦£¡
Éú»îÒÀȻҪ¼ÌÐø£¬Ñ§Ï°ÒÀ¾ÉÒª¼ÌÐ ......

JAVA Something

JDK
Sun JDK
http://java.sun.com/javase/downloads/index.jsp
IBM JDK
http://www.ibm.com/developerworks/java/
http://www.ibm.com/developerworks/cn/java/
IDE:
Eclipse
http://www.eclipse.org/
Container:
Apache HTTP server
http://www.apache.org/
Tomcat: JSP,Servlet,JavaBean container.
http:// ......

Æß Java EE

   ʲôÊÇjava EEÁË¡£Ò»°ãÀ´Ëµ£¬Ò»¸ö³ÉÊìµÄjava EE½â¾ö·½°¸£¬°üÀ¨ÒÔϼ¸¸ö²¿·Ö¡£
 
 1¡¢¿ÉÒÔ¶ÔÍâÌṩ»ùÓÚ±ê׼ЭÒéÈçxmlµÄ·þÎñ
ÈçWeb Service
 2¡¢ÄÚ²¿Í¨ÐÅ»ùÓÚÃæÏò¶ÔÏóµÄͨÐÅЭÒé
Èç RMI£¬Corba£¬XML RPC
 3¡¢°²È«ÐԸߣ¬È¨ÏÞ¿ØÖÆÑϸñ
Èç MD5£¬SSL£¬AccountDomain
 4 &nbs ......

JAVA³ÌÐòÔ±µÄǮ;

      Ç廪´óѧ³ö°æÉ硶Java³ÌÐòÔ±£¬ÉÏ°àÄǵãʶù¡·×÷ÕߣºÖÓÉù Õ½ڣº1.1С½Ú
      ÎÒÃǸոսøÈë±¾ÊéµÄÕýÌâ¾ÍÄóöÒ»¸öËײ»¿ÉÄÍ“Ç®”×ÖÀ´ºÍ´ó¼Ò´ó̸ÌØ̸£¬Î´Ãâ²»ÑÅ¡£µ«ÊÇ£¬ÎÒ»¹ÊÇÒªÔÚÒ»¿ªÊ¼¾ÍҪ˵Õâ¸öÎÊÌ⣬ÒòΪÕâÊǺܶàÅóÓѹØÐĵÄÎÊÌ⣬Ϊʲô²»ÏÈ˵ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ