尝试从服务器获取文件列表时 FTPClient.listnames() 挂起
我正在尝试从 FTP 服务器获取文件列表。 我在服务器上的目录是“upload”目录,我正在尝试使用 apache ftpclient 库从该目录获取文件名列表。
我成功连接到服务器并且登录也成功,但是当线路...
FTPClientOBJ.listNames(); // for root directory i tried this and
FTPClientOBJ.listNames("/upload/"); // for upload directory which is in root directory
出现时,当时进程挂起,一段时间后(3-4分钟)我收到异常,提示连接已关闭而没有任何指示。
我正在尝试在 Android 中执行此操作。
谢谢。
I am trying to get the list of files from FTPserver.
My directory on server is "upload" directory, and i am trying to get the file name list from that directory using apache ftpclient library.
I connect to server successfully and login also successful but when the line ...
FTPClientOBJ.listNames(); // for root directory i tried this and
FTPClientOBJ.listNames("/upload/"); // for upload directory which is in root directory
comes, at that time process hangs and after some time(3-4 min) i am getting exception that says Connection Closed without indication.
I am trying to do this in android.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了问题..
我没有启用被动模式,这就是出现问题的原因。
启用被动模式后我解决了我的问题。
I resolved the issuee ..
I was not enabling the passive mode thats why problem was occuring.
After enabling passive mode i solved my problem.