I'm trying to read the file on the FTP remote-server using Apache Commons Net library.
retrieveFileStream
returns InputStream
and put it in BufferedReader
.
But, I want to use RandomAccessFile
(to use the seek()
method).
I want to get Inputstream
as a RandomAccessFile
.
Is it possible?
FTPClient ftp = new FTPClient();
InputStream in = ftp.retrieveFileStream(remote_file_name);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));