1 Star 0 Fork 1.4K

javaalpha/DocSys

forked from Rainy/DocSys 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
FtpUtilTest.java 842 Bytes
一键复制 编辑 原始数据 按行查看 历史
13777479349 提交于 2021-12-14 16:44 +08:00 . FTP远程存储优化、系统安全性优化
package com.DocSystem.test;
import java.io.FileInputStream;
import com.DocSystem.common.remoteStorage.FtpUtil;
public class FtpUtilTest {
public static void main(String[] args) throws Exception {
FtpUtil ftp = new FtpUtil("sg10", "sg10", "10.108.163.51", 21, null, null);
String remotePath = "/gaolei/20210730_csibunding_enable_CSI_DTX/";
String localPath = "C:/FtpTestRootPath/";
String fileName = "123.txt";
ftp.login();
//Upload test
FileInputStream is = new FileInputStream(localPath + "/" + fileName);
ftp.upload(remotePath, fileName, is);
is.close();
//Download Test
ftp.download(remotePath, localPath, fileName);
//Delte Test
ftp.delFile(remotePath, fileName);
ftp.logout();
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/javaalpha/DocSys.git
git@gitee.com:javaalpha/DocSys.git
javaalpha
DocSys
DocSys
master

搜索帮助