i wonder if there is a way to read text file line by line from the end from FTP server. I need to read large file, and I'm interested only in the last few lines.
I am able to read last line from file on my HD with code from this question: Quickly read the last line of a text file?, and I am able too to read file on FTP server line by line with code from there: Java. Read file from FTP but DON'T download it whole.
But in first case function tail uses variable type File, while second code uses variable type InputStream.
When I was looking for way of conversion stream to file, I found that only real way is download content to tmp file (How to convert InputStream to virtual File). But I don't want to download this file, because it may be be very large, as I wrote.
Does anybody know another way to do this?