Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 81C3D9F1B for ; Wed, 25 Jan 2012 11:25:37 +0000 (UTC) Received: (qmail 82921 invoked by uid 500); 25 Jan 2012 11:25:36 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 82584 invoked by uid 500); 25 Jan 2012 11:25:35 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 82576 invoked by uid 99); 25 Jan 2012 11:25:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2012 11:25:35 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nestor.urquiza@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-tul01m020-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2012 11:25:28 +0000 Received: by obcuy19 with SMTP id uy19so11192226obc.30 for ; Wed, 25 Jan 2012 03:25:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=G9mGIuR2EQBDf38U9PzWC4bzCaaNlVz1Nmwz+NZgm/Y=; b=LQnf9ZqZIoO3DuYxmoBOGo50BV8RgsJxkX7MMKe85i7HWdtknOliVFWNKMsh8q5tPH dhKR6o8I11oanS7wg4MgLS96l8DkoU0UvFQZrAFDseByaiwgw02rwi80vwFYCsoAMas4 UWCGZzKumpHrtMoXiJx2KEGjU9lx1Gw+UPR/s= MIME-Version: 1.0 Received: by 10.182.49.106 with SMTP id t10mr15473322obn.49.1327490708332; Wed, 25 Jan 2012 03:25:08 -0800 (PST) Received: by 10.182.183.5 with HTTP; Wed, 25 Jan 2012 03:25:08 -0800 (PST) Date: Wed, 25 Jan 2012 06:25:08 -0500 Message-ID: Subject: [vfs] SFTP from an InputStream From: Nestor Urquiza To: user@commons.apache.org Content-Type: text/plain; charset=ISO-8859-1 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