package junit;
import java.io.*;
import sun.net.TelnetInputStream;
import sun.net.ftp.*;
import java.util.zip.*;
public class Testaa {
private static String path = "D:/";
private static String filenameTemp;
public static void main(String[] args) throws FileNotFoundException,
IOException, InterruptedException {
// TODO 从FTP服务器下载文件为压缩包
File f = new File("aaa.zip"); // 文件MyZIPFile.zip是最终的压缩包
String fileToDownload = ""; // 将要下载的文件名称
TelnetInputStream is = null;
byte[] b = new byte[1000];
int length = 0;
FtpClient ftp = new FtpClient("222.161.209.50", 10021);
ftp.login("yhtc_gxyh_b", "yhtc_gxyh_b2015");
if (!ftp.serverIsOpen()) {
System.out.println("Failed to login to 192.168.1.10")