I have requirement in which we need to connect Secure FTP to download file and send that file content to another web service.
and vice versa to get data from web service and write in file on Secure FTP.
For Secure FTP purpose we are going to use ftp4j lib.But in ftp4j there is no method to read file content separately.
Whenever I have to read file from SFTP I have to store that content in local file.
I have checked those methods.
Download method can be used to download a remote file from the server to a local file.
but I just want to read content of that remote file into any of the String Variable without storing it into local file.
Is there any way??
I don't think you looked close enough.
Most of the download methods take a File argument. The one I pointed you to takes an OutputStream. If you have an OutputStream, you can divert the data into a String.