commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <>
Subject [vfs] SFTP from an InputStream
Date Wed, 25 Jan 2012 11:25:08 GMT
Hi guys,

I have an input stream that I would like to push into a remote SFTP
server without creating a local file.

Just as an example of what I have tried the below throws an NPE as
getContent() returns null.

FileObject virtualFile = manager.createVirtualFileSystem("tmp:/" +
OutputStream outputStream = localFile.getContent().getOutputStream();
IOUtils.copy(inputStream, outputStream);

Thanks in advance!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message