title: How can I use SSHJ to stream a file via SCP?
body: <p>I am using the SSHJ library (<a href="https://github.com/shikhar/sshj" rel="nofollow">https://github.com/shikhar/sshj</a>).</p>
  
  <p>I can use <code>sshClient.newSCPFileTransfer();</code> to get my <code>SCPClient</code> object, but then the call to <code>scpClient.download()</code> requires either a String as the path for the destination file or a LocalDestFile object. All I want is to open a stream to download the file to. Is there a way to easily do this using SSHJ?</p>
  
  <p>I looked at the different implementations of LocalDestFile, but nothing seemed applicable to this use case.</p>
  
  <p>The specific use case is downloading a remote file and streaming it to a client's browser for a web app. I have to use SCP for this and thus want to use the SSHJ library.</p>