从ftp服务器下载文件

来源:互联网 发布:matlab矩阵运算 编辑:程序博客网 时间:2024/05/18 00:11

java code:

FTPClient fc = null;fc = new FTPClient(ftpserver);        //服务器路径fc.login(ftpuser, ftppassword);fc.chdir(ftppath);                    //更换路径fc.setType(FTPTransferType.BINARY);byte[] b = fc.get(ftpfile1);          //获取的文件FileOutputStream fp = new FileOutputStream(filePath1);  //创建本地文件fp.write(b);fp.close();


获取excel2003文件数据使用类:Workbook,Sheet等


0 0
原创粉丝点击