|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.search.zip.ZFile
Zipfile data file.
This represents the contents of an entry found within a zipfile.
ZArchive
Field Summary | |
protected java.util.zip.ZipEntry |
m_entry
|
protected ZArchive |
m_searcher
Searcher that found and created this zipfile entry. |
protected int |
m_serialNo
Serial number (zipfile open count). |
protected static java.lang.String[] |
s_attrNames
Zipfile entry key attribute names. |
static int |
SERIES
Series number. |
Constructor Summary | |
protected |
ZFile(ZArchive searcher,
java.util.zip.ZipEntry ent,
int serialNo)
Constructor. |
Method Summary | |
boolean |
canRead()
Determine if this zipfile entry is readable. |
boolean |
canWrite()
Determine if this zipfile entry is writable. |
boolean |
exists()
Determine if this zipfile entry exists. |
java.lang.Object |
getAttribute(java.lang.String key)
Retrieve the value of an attribute for this zipfile entry. |
java.lang.String[] |
getAttributeNames()
Retrieve the attribute names for this zipfile entry. |
java.io.InputStream |
getInputStream()
Get a readable input stream for this zipfile entry. |
java.lang.String |
getName()
Retrieve the name of this zipfile entry. |
java.lang.String |
getType()
Retrieve the type of the data file corresponding to this zipfile entry. |
boolean |
isDirectory()
Determine if this zipfile entry specifies a directory entry. |
java.util.Date |
lastModified()
Determine the date that this zipfile entry was last modified. |
long |
length()
Determine the length of this zipfile entry. |
void |
setAttribute(java.lang.String attr,
java.lang.Object val)
Set the value of an attribute for this zipfile entry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SERIES
protected static final java.lang.String[] s_attrNames
protected ZArchive m_searcher
protected java.util.zip.ZipEntry m_entry
protected int m_serialNo
Constructor Detail |
protected ZFile(ZArchive searcher, java.util.zip.ZipEntry ent, int serialNo)
searcher
- The zipfile searcher that found and created this entry.ent
- The zipfile entry for this file entry.serialNo
- The open count at the time the zipfile containing this entry was opened.Method Detail |
public boolean exists()
exists
in interface DocumentI
public boolean isDirectory()
isDirectory
in interface DocumentI
public boolean canRead()
canRead
in interface DocumentI
DocumentI.getInputStream()
,
DocumentI.canWrite()
public boolean canWrite()
canWrite
in interface DocumentI
DocumentI.getInputStream()
,
DocumentI.canRead()
public long length()
length
in interface DocumentI
public java.util.Date lastModified()
lastModified
in interface DocumentI
public java.lang.String getName()
getName
in interface DocumentI
public java.lang.String getType()
getType
in interface DocumentI
public java.lang.String[] getAttributeNames()
getAttributeNames
in interface DocumentI
java.lang.Exception
- Thrown if the information about the entry is unobtainable, or if some
other error occurs.getAttribute(java.lang.String)
public java.lang.Object getAttribute(java.lang.String key)
getAttribute
in interface DocumentI
key
- The name of an attribute associated with this zipfile entry.
The following attribute names are supported:
"comment" String "compressed_size" Long "crc" Long "extra" byte[] "method" String "name" String "size" Long "time" Date
java.lang.Exception
- Thrown if the information about the entry is unobtainable, or if some
other error occurs.getAttributeNames()
public void setAttribute(java.lang.String attr, java.lang.Object val) throws java.lang.Exception, java.lang.UnsupportedOperationException
setAttribute
in interface DocumentI
attr
- The name of an attribute associated with this document.val
- The new value of the specified attribute.
java.lang.UnsupportedOperationException
- (unchecked)
Always thrown, because this method is not implemented for this document
type.
java.lang.Exception
- Thrown if the information about the document cannot be set, or if some
other error occurs.DocumentI.getAttributeNames()
public java.io.InputStream getInputStream() throws java.io.IOException, java.util.zip.ZipException
getInputStream
in interface DocumentI
java.io.IOException
- Thrown if the input stream cannot be obtained, or if some other error
occurs.
java.util.zip.ZipException
- Thrown if the input stream cannot be obtained from the zipfile.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |