sftp上传实现

This commit is contained in:
laoyuyu
2020-01-18 10:00:06 +08:00
parent 50b265f22a
commit d217ebcb25
59 changed files with 1616 additions and 387 deletions

View File

@@ -30,7 +30,6 @@ import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
@@ -136,6 +135,18 @@ public class CommonUtil {
return new String(str.getBytes(charSet), SERVER_CHARSET);
}
/**
* 将字符串转换为Ftp服务器默认的ISO-8859-1编码
*
* @param charSet 字符串编码
* @param str 需要转换的字符串
* @return 转换后的字符串
*/
public static String convertSFtpChar(String charSet, String str)
throws UnsupportedEncodingException {
return new String(str.getBytes(), charSet);
}
/**
* 获取某包下所有类
*
@@ -481,7 +492,6 @@ public class CommonUtil {
}
}
/**
* 校验文件MD5码
*/