使用FTPClient Java检索文件内容 [英] Retrieving file content using FTPClient Java

查看:290
本文介绍了使用FTPClient Java检索文件内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用commons FTPCLIENT
我只想从ftp服务器获取文件内容。
我不想将它写入临时文件。
有没有办法做到这一点。
fileoutputstream应该始终指向一个本地文件。



在此先感谢。 使用 /apache/commons/net/ftp/FTPClient.html#retrieveFileStream%28java.lang.String%29rel =noreferrer> FTPClient.retrieveFileStream(String)


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.

解决方案

Use FTPClient.retrieveFileStream(String).

这篇关于使用FTPClient Java检索文件内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆