commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nestor.urqu...@gmail.com>
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:/" +
localFileInputStreamName);
OutputStream outputStream = localFile.getContent().getOutputStream();
IOUtils.copy(inputStream, outputStream);

Thanks in advance!
-Nestor

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message