All Packages Class Hierarchy This Package Previous Next Index
Class java.util.zip.ZipEntry
java.lang.Object
|
+----java.util.zip.ZipEntry
- public class ZipEntry
- extends Object
- implements ZipConstants
This class is used to represent a ZIP file entry.
-
ZipEntry()
- Creates a new ZIP file entry with no name.
-
ZipEntry(String)
- Creates a new ZIP file entry with the specified name.
-
getComment()
- Returns the file comment for the entry, or null if none.
-
getCrc()
- Returns the crc-32 for the entry.
-
getExtra()
- Returns extra field data for the entry, or null if none.
-
getName()
- Returns the name of the entry, or null if not specified.
-
getSize()
- Returns the size of the entry, or -1 if not specified.
-
getTime()
- Returns the modification time of the entry, or 0 if not specified.
-
isDirectory()
- Returns true if this is a directory.
-
setComment(String)
- Sets the file comment for this entry.
-
setCrc(long)
- Sets the crc-32 for the entry.
-
setExtra(byte[])
- Sets extra field data for this entry.
-
setName(String)
- Sets the name of the entry.
-
setSize(long)
- Sets the size of the entry.
-
setTime(long)
- Sets the modification time of the entry.
-
toString()
- Returns a string representation of the ZIP entry.
-
toString(boolean)
- Returns a string representation of the ZIP entry.
ZipEntry
public ZipEntry(String name)
- Creates a new ZIP file entry with the specified name.
- Parameters:
- name - the entry name
ZipEntry
public ZipEntry()
- Creates a new ZIP file entry with no name.
setName
public void setName(String name)
- Sets the name of the entry.
- Parameters:
- name - the entry name
setTime
public void setTime(long time)
- Sets the modification time of the entry.
- Parameters:
- time - the entry modification time
setSize
public void setSize(long size)
- Sets the size of the entry.
- Parameters:
- size - size of entry in bytes
setCrc
public void setCrc(long crc)
- Sets the crc-32 for the entry.
- Parameters:
- crc - the crc-32 for the entry.
setExtra
public void setExtra(byte extra[])
- Sets extra field data for this entry.
- Parameters:
- extra - extra field data for entry
setComment
public void setComment(String comment)
- Sets the file comment for this entry.
getName
public String getName()
- Returns the name of the entry, or null if not specified.
getSize
public long getSize()
- Returns the size of the entry, or -1 if not specified.
getCrc
public long getCrc()
- Returns the crc-32 for the entry.
getTime
public long getTime()
- Returns the modification time of the entry, or 0 if not specified.
getExtra
public byte[] getExtra()
- Returns extra field data for the entry, or null if none.
getComment
public String getComment()
- Returns the file comment for the entry, or null if none.
isDirectory
public boolean isDirectory()
- Returns true if this is a directory. A directory entry is defined
to be an entry whose name ends with a '/'.
toString
public String toString()
- Returns a string representation of the ZIP entry.
- Overrides:
- toString in class Object
toString
public String toString(boolean detailed)
- Returns a string representation of the ZIP entry.
All Packages Class Hierarchy This Package Previous Next Index