Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 42936 invoked from network); 21 Feb 2006 17:35:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Feb 2006 17:35:18 -0000 Received: (qmail 84509 invoked by uid 500); 21 Feb 2006 17:35:12 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 84463 invoked by uid 500); 21 Feb 2006 17:35:11 -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 84452 invoked by uid 99); 21 Feb 2006 17:35:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2006 09:35:11 -0800 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=HTML_10_20,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of raigsingh@gmail.com designates 64.233.182.201 as permitted sender) Received: from [64.233.182.201] (HELO nproxy.gmail.com) (64.233.182.201) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2006 09:35:11 -0800 Received: by nproxy.gmail.com with SMTP id o25so835258nfa for ; Tue, 21 Feb 2006 09:34:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=NBveGS+GDzwEdiPcXvtP7BHq9rM3zSyEyj8oC2kq1tnQBQT0JFn/VEgcpJKHMVM8/khtu5vYo8jMuLd20VD8iADQ0kX3WgmK0QMuWGxif0jEEO6eN6ZaT3SsCvgVDPglSR6FwkvfqdsJacbZXDvHnY5+cx0z/CpQxfPqi5PczhY= Received: by 10.49.68.11 with SMTP id v11mr1556169nfk; Tue, 21 Feb 2006 09:34:49 -0800 (PST) Received: by 10.49.49.8 with HTTP; Tue, 21 Feb 2006 09:34:49 -0800 (PST) Message-ID: Date: Tue, 21 Feb 2006 12:34:49 -0500 From: "Rai Singh" To: commons-user@jakarta.apache.org Subject: [VFS] Retrieving a FileContent instance MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1474_31859067.1140543289786" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_1474_31859067.1140543289786 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I am trying to get a FileContent object from a FileObject so that I can retrieve the value from getLastModifiedTime(). I am to successfully create FileObject using the following URI: jar:file:/c:/neo/code/dist/crosssell.jar when calling resolveFile on FileSystemManager. However, when I call the following, I receive a NullPointerException on the call to getLastModifiedTime() because DefaultFileContent's default getLastModifiedTime() method is invoked and it is simply not implemented to do anything useful. // fsManager is a DefaultFileSystemManager instance. FileObject fileObject =3D fsManager.resolveFile(deployFile.getFileName()= ); FileContent fileContent =3D fileObject.getContent(); long lastModTime =3D fileContent.getLastModifiedTime(); What is the correct way to reference a FileContent object. In my case, I am interested in FileContent for jar files. If I am misusing the API, please advise. Thanks, Rai ------=_Part_1474_31859067.1140543289786--