使用 FTPClient Java 检索文件内容
我使用commons FTPCLIENT 我只想从 ftp 服务器获取文件内容。 我不想将其写入临时文件。 有什么办法可以做到这一点吗? fileoutputstream 应始终指向本地文件。
提前致谢。
Im using commons FTPCLIENT
I just want the file content from the ftp server.
i dont want to write it to a temporary file.
Is there any way to do that.
The fileoutputstream should always point to a local file.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用
FTPClient.retrieveFileStream(String)
。Use
FTPClient.retrieveFileStream(String)
.您应该使用retrieveFilestream 方法而不是retriveFile 方法。
You should use retrieveFilestream method instead of retriveFile method..
非常感谢您的快速回复..
这对我有用..
这就是我尝试过的。
-
Thanks a lot for the quick reply..
And that did work for me..
this is what i tried .
-