commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nestor.urqu...@gmail.com>
Subject Re: [vfs] SFTP from an InputStream
Date Wed, 25 Jan 2012 18:35:00 GMT
In case anybody is interested in a possible solution I have posted it
in http://thinkinginsoftware.blogspot.com/2012/01/commons-vfs-sftp-from-java-simple-way.html

On Wed, Jan 25, 2012 at 6:25 AM, Nestor Urquiza
<nestor.urquiza@gmail.com> wrote:
> 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