求救:多线程FTP有时取不出文件来,getReplyString()得到 227 Entering Passive Mode的信息,各位高手,有没有遇到这个问题,多谢!?
北极羊 2008-01-16 08:40:56 代码如下:
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,各位高手,有没有遇到这个问题,多谢!