Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 32130 invoked from network); 6 Oct 2005 08:41:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Oct 2005 08:41:57 -0000 Received: (qmail 2004 invoked by uid 500); 6 Oct 2005 08:41:50 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 1965 invoked by uid 500); 6 Oct 2005 08:41:50 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 1954 invoked by uid 99); 6 Oct 2005 08:41:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2005 01:41:50 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mario@ops.co.at designates 194.152.182.4 as permitted sender) Received: from [194.152.182.4] (HELO smtp.ops.co.at) (194.152.182.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2005 01:41:53 -0700 Received: by smtp.ops.co.at (Postfix, from userid 65534) id 5A57323C0AC; Thu, 6 Oct 2005 10:41:25 +0200 (CEST) Received: from [172.27.1.102] (lints1.int.ops.co.at [172.27.1.102]) by smtp.ops.co.at (Postfix) with ESMTP id 1B74123C0AB for ; Thu, 6 Oct 2005 10:41:22 +0200 (CEST) Message-ID: <4344E332.5070906@ops.co.at> Date: Thu, 06 Oct 2005 10:41:22 +0200 From: Mario Ivankovits User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [vfs] Restart function by using Commons VFS References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on smtp.ops.co.at X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, hits=-18.5 required=7.0 tests=AWL,BAYES_00, LOCAL_WHITE_RECV_TS1,RATWR10_MESSID,SARE_TOCC_USER autolearn=ham version=2.64 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi! erwan.foll@libertysurf.fr wrote: >1- Is it possible to perform FTP restart function when using >VFS api ? (I know that the restart function is available in >COMMONS NET by using the setRestartOffset(long offset) >method of the FTPClient class) > You can use the RandomAccessContent: FileObject fo = VFS.getManager().resolveFile("ftp://..."); RandomAccessContent rac = fo.getContent().getRandomAccessContent(RandomAccessMode.READ); rac.seek(4711); If you need a InputStream you can aquire one by using: InputStream is = rac.getInputStream(); >2- Is it possible to perform SFTP restart function when >using VFS api ? (I don't know if the restart function is >available in Jcraft Jsch) > The newest version of jsch allows such a "restart", but its current api isnt backward compatible so I cant drop it into VFS now. Once this has been done you will use the same code as above. Ciao, Mario --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org