|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavafe.genericfile.ZipGenericFile
A ZipGenericFile represents a zipfile-entry file (java.util.zip.ZipEntry) as a GenericFile. WARNING: ZipEntry's (but not ZipFile's) always use "/" as their separator.
| Field Summary | |
java.util.zip.ZipEntry |
underlyingZipEntry
|
java.util.zip.ZipFile |
underlyingZipFile
|
| Constructor Summary | |
ZipGenericFile(java.util.zip.ZipFile file,
java.util.zip.ZipEntry entry)
Create a generic file representing a ZipEntry in a ZipFile: |
|
| Method Summary | |
java.lang.String |
getCanonicalID()
Return a String that canonically represents the identity of our underlying file. |
java.lang.String |
getHumanName()
Return a name that uniquely identifies us to the user. |
java.io.InputStream |
getInputStream()
Open the file we represent as an InputStream. |
java.lang.String |
getLocalName()
Return our local name, the name that distinguishes us within the directory that contains us. |
GenericFile |
getSibling(java.lang.String n)
Attempt to return a GenericFile that describes the file in the same "directory" as us that has the local name n. |
boolean |
isDirectory()
Do we represent a directory? |
long |
lastModified()
Returns the time that the file represented by us was last modified. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public java.util.zip.ZipFile underlyingZipFile
public java.util.zip.ZipEntry underlyingZipEntry
| Constructor Detail |
public ZipGenericFile(java.util.zip.ZipFile file,
java.util.zip.ZipEntry entry)
| Method Detail |
public java.lang.String getHumanName()
getHumanName in interface GenericFilepublic java.lang.String getCanonicalID()
getCanonicalID in interface GenericFilepublic java.lang.String getLocalName()
getLocalName in interface GenericFilepublic boolean isDirectory()
isDirectory in interface GenericFile
public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOEXception may be thrown for many reasons, including no such file and read permission denied.
getInputStream in interface GenericFilejava.io.IOExceptionpublic long lastModified()
The return value is system dependent and should only be used to compare with other values returned by last modified. It should not be interpreted as an absolute time.
If a last-modified time is not available (e.g., underlying file doesn't exist, no time specified in a zipentry, etc.), then 0L is returned.
lastModified in interface GenericFilepublic GenericFile getSibling(java.lang.String n)
n. No attempt is made to verify whether or not that file exists.
In cases where the notion of "containing directory" makes no sense (e.g., streams or root directories), null is returned.
getSibling in interface GenericFile
|
ESC/Java2 © 2003,2004,2005,2006 David Cok and Joseph Kiniry © 2005,2006 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||