代码如下:
ftp.setFileType(FTP.BINARY_FILE_TYPE);
String remote = checkRemote(filePath);
InputStream input = ftp.retrieveFileStream(remote);
if (input == null) {
if (filePath.indexOf("jcTemplate") >= 0) {
org.apache.log4j.LogManager.getLogger(this.getClass()).error("FTP对象"+ftp.toString() +
"getReplyString:" + ftp.getReplyString() +" getReplyStrings:" +
arraytoString(ftp.getReplyStrings()) + "状态:" + ftp.getStatus() +
"ftp文件:" + ftppath + "/" + filePath + "不存在!");
}
return strRet;
}InputStream input = ftp.retrieveFileStream(remote);有时会NULL有时是正常的,FTP下面是有这个文件的,我的程序是多线程
FTP服务器是IIS,客户端用的apache的FtpClient,各位高手,有没有遇到这个问题,多谢!
ftp.setFileType(FTP.BINARY_FILE_TYPE);
String remote = checkRemote(filePath);
InputStream input = ftp.retrieveFileStream(remote);
if (input == null) {
if (filePath.indexOf("jcTemplate") >= 0) {
org.apache.log4j.LogManager.getLogger(this.getClass()).error("FTP对象"+ftp.toString() +
"getReplyString:" + ftp.getReplyString() +" getReplyStrings:" +
arraytoString(ftp.getReplyStrings()) + "状态:" + ftp.getStatus() +
"ftp文件:" + ftppath + "/" + filePath + "不存在!");
}
return strRet;
}InputStream input = ftp.retrieveFileStream(remote);有时会NULL有时是正常的,FTP下面是有这个文件的,我的程序是多线程
FTP服务器是IIS,客户端用的apache的FtpClient,各位高手,有没有遇到这个问题,多谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货