您的位置:程序门 -> java -> 框架、开源



求救:多线程ftp有时取不出文件来,getreplystring()得到 227 entering passive mode的信息,各位高手,有没有遇到这个问题,多谢!?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


求救:多线程ftp有时取不出文件来,getreplystring()得到 227 entering passive mode的信息,各位高手,有没有遇到这个问题,多谢!?
发表于:2008-01-16 20: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,各位高手,有没有遇到这个问题,多谢!


快速检索

最新资讯
热门点击