I am using the SSHJ library (https://github.com/shikhar/sshj).
I can use sshClient.newSCPFileTransfer();
to get my SCPClient
object, but then the call to scpClient.download()
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?
I looked at the different implementations of LocalDestFile, but nothing seemed applicable to this use case.
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.