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.


Constructor Index

 o ZipEntry()
Creates a new ZIP file entry with no name.
 o ZipEntry(String)
Creates a new ZIP file entry with the specified name.

Method Index

 o getComment()
Returns the file comment for the entry, or null if none.
 o getCrc()
Returns the crc-32 for the entry.
 o getExtra()
Returns extra field data for the entry, or null if none.
 o getName()
Returns the name of the entry, or null if not specified.
 o getSize()
Returns the size of the entry, or -1 if not specified.
 o getTime()
Returns the modification time of the entry, or 0 if not specified.
 o isDirectory()
Returns true if this is a directory.
 o setComment(String)
Sets the file comment for this entry.
 o setCrc(long)
Sets the crc-32 for the entry.
 o setExtra(byte[])
Sets extra field data for this entry.
 o setName(String)
Sets the name of the entry.
 o setSize(long)
Sets the size of the entry.
 o setTime(long)
Sets the modification time of the entry.
 o toString()
Returns a string representation of the ZIP entry.
 o toString(boolean)
Returns a string representation of the ZIP entry.

Constructors

 o ZipEntry
  public ZipEntry(String name)
Creates a new ZIP file entry with the specified name.

Parameters:
name - the entry name
 o ZipEntry
  public ZipEntry()
Creates a new ZIP file entry with no name.

Methods

 o setName
  public void setName(String name)
Sets the name of the entry.

Parameters:
name - the entry name
 o setTime
  public void setTime(long time)
Sets the modification time of the entry.

Parameters:
time - the entry modification time
 o setSize
  public void setSize(long size)
Sets the size of the entry.

Parameters:
size - size of entry in bytes
 o setCrc
  public void setCrc(long crc)
Sets the crc-32 for the entry.

Parameters:
crc - the crc-32 for the entry.
 o setExtra
  public void setExtra(byte extra[])
Sets extra field data for this entry.

Parameters:
extra - extra field data for entry
 o setComment
  public void setComment(String comment)
Sets the file comment for this entry.

 o getName
  public String getName()
Returns the name of the entry, or null if not specified.

 o getSize
  public long getSize()
Returns the size of the entry, or -1 if not specified.

 o getCrc
  public long getCrc()
Returns the crc-32 for the entry.

 o getTime
  public long getTime()
Returns the modification time of the entry, or 0 if not specified.

 o getExtra
  public byte[] getExtra()
Returns extra field data for the entry, or null if none.

 o getComment
  public String getComment()
Returns the file comment for the entry, or null if none.

 o 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 '/'.

 o toString
  public String toString()
Returns a string representation of the ZIP entry.

Overrides:
toString in class Object
 o toString
  public String toString(boolean detailed)
Returns a string representation of the ZIP entry.


All Packages  Class Hierarchy  This Package  Previous  Next  Index