title: How to read remote file in reversed order line by line while using JSch
body: <p>I am connecting a remote server by using <code>jsch</code> library(SSH connection is a must). I am using <code>ChannelSftp</code> class to access remote file. Since the file is so large ( Tomcat's catalina.out) i need to read the log file in reversed order and download x lines to my machine. <code>ChannelSftp.get</code> gives me <code>InputStream</code> but i couldnt find a way to read it in reverse order without downloading it. I tried to use apache.commons.io jar's <code>ReversedLinesFileReader</code> class but it takes <code>File</code> class as constructor parameter which forces me to download file.</p>
  
  <p>Any suggestions?</p>
  
  <p><strong><em>Edit: Line by line is not possible for my case. I am downloading by size.</em></strong></p>