Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 28155 invoked from network); 8 Mar 2007 14:58:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2007 14:58:47 -0000 Received: (qmail 86952 invoked by uid 500); 8 Mar 2007 14:58:53 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 86875 invoked by uid 500); 8 Mar 2007 14:58:53 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 86863 invoked by uid 99); 8 Mar 2007 14:58:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2007 06:58:53 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2007 06:58:44 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4464D71406F for ; Thu, 8 Mar 2007 06:58:24 -0800 (PST) Message-ID: <20619126.1173365904276.JavaMail.root@brutus> Date: Thu, 8 Mar 2007 06:58:24 -0800 (PST) From: "Andrew Serff (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Updated: (VFS-116) Add Write capability to RandomAccessContent for all providers In-Reply-To: <3251976.1173328044262.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VFS-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Serff updated VFS-116: ----------------------------- Attachment: svn_diff.txt Attached the svn diff output. I just did it from the top level. If you need it for each file separately, please let me know. > Add Write capability to RandomAccessContent for all providers > ------------------------------------------------------------- > > Key: VFS-116 > URL: https://issues.apache.org/jira/browse/VFS-116 > Project: Commons VFS > Issue Type: Improvement > Affects Versions: 1.0, 1.1 > Environment: Java 1.5 / any os > Reporter: Andrew Serff > Attachments: AbstractRandomAccessStreamContent.java, FtpFileProvider.java, FtpRandomAccessContent.java, HttpRandomAccesContent.java, SftpFileProvider.java, SftpRandomAccessContent.java, svn_diff.txt > > > Writing to RandomAccessContent seems to only work for the File provider. Reading works for all it seems, just not writing. The main ones I'm worried about are ftp and sftp. Here is what I know: > FtpRandomAccessContent and SftpRandomAccessContent both extend from AbstractRandomAccessStreamContent. (The Http one does too, but I'm not interested in that one right now.) > AbstractRandomAccessStreamContent extends from RandomAccessContent which only exposes the read methods and throws UnsupportedOperationExceptions for all the write methods. > If you just add the write methods to AbstractRandomAccessStreamContent (calling getDataOutputStream().write*(v)) and then add an abstract method getDataOutputStream() to it, the subclasses will need to implement that. > You also need to add the RANDOM_ACCESS_WRITE Capability to the SFTP and FTP FileProviders. > I have been trying to do this tonight but I'm not having much luck with getting anything to write with both FTP and SFTP. I'm unfamiliar with JSch and Commons FTP, so I might just be missing something. If anyone could help, I'd be glad to submit a fix for this "Improvement" issue. I will either attach my changed files or add some comments to this issue to show the changes I have made. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org