java.util.zip
public class ZipEntry extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
CENATT |
static int |
CENATX |
static int |
CENCOM |
static int |
CENCRC |
static int |
CENDSK |
static int |
CENEXT |
static int |
CENFLG |
static int |
CENHDR |
static int |
CENHOW |
static int |
CENLEN |
static int |
CENNAM |
static int |
CENOFF |
static long |
CENSIG |
static int |
CENSIZ |
static int |
CENTIM |
static int |
CENVEM |
static int |
CENVER |
static int |
DEFLATED
Compression method.
|
static int |
ENDCOM |
static int |
ENDHDR |
static int |
ENDOFF |
static long |
ENDSIG |
static int |
ENDSIZ |
static int |
ENDSUB |
static int |
ENDTOT |
static int |
EXTCRC |
static int |
EXTHDR |
static int |
EXTLEN |
static long |
EXTSIG |
static int |
EXTSIZ |
static int |
LOCCRC |
static int |
LOCEXT |
static int |
LOCFLG |
static int |
LOCHDR |
static int |
LOCHOW |
static int |
LOCLEN |
static int |
LOCNAM |
static long |
LOCSIG |
static int |
LOCSIZ |
static int |
LOCTIM |
static int |
LOCVER |
static int |
STORED
Compression method.
|
Constructor and Description |
---|
ZipEntry(String name)
Creates a zip entry with the given name.
|
ZipEntry(ZipEntry e)
Creates a copy of the given zip entry.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of this zip entry.
|
String |
getComment()
Gets the comment.
|
long |
getCompressedSize()
Gets the size of the compressed data.
|
long |
getCrc()
Gets the crc of the uncompressed data.
|
byte[] |
getExtra()
Gets the extra data.
|
int |
getMethod()
Gets the compression method.
|
String |
getName()
Returns the entry name.
|
long |
getSize()
Gets the size of the uncompressed data.
|
long |
getTime()
Gets the time of last modification of the entry.
|
int |
hashCode()
Gets the hashCode of this ZipEntry.
|
boolean |
isDirectory()
Gets true, if the entry is a directory.
|
void |
setComment(String comment)
Sets the entry comment.
|
void |
setCompressedSize(long csize)
Sets the size of the compressed data.
|
void |
setCrc(long crc)
Sets the crc of the uncompressed data.
|
void |
setExtra(byte[] extra)
Sets the extra data.
|
void |
setMethod(int method)
Sets the compression method.
|
void |
setSize(long size)
Sets the size of the uncompressed data.
|
void |
setTime(long time)
Sets the time of last modification of the entry.
|
String |
toString()
Gets the string representation of this ZipEntry.
|
public static final int STORED
public static final int DEFLATED
public static final int LOCHDR
public static final long LOCSIG
public static final int LOCVER
public static final int LOCFLG
public static final int LOCHOW
public static final int LOCTIM
public static final int LOCCRC
public static final int LOCSIZ
public static final int LOCLEN
public static final int LOCNAM
public static final int LOCEXT
public static final long EXTSIG
public static final int EXTHDR
public static final int EXTCRC
public static final int EXTSIZ
public static final int EXTLEN
public static final long CENSIG
public static final int CENHDR
public static final int CENVEM
public static final int CENVER
public static final int CENFLG
public static final int CENHOW
public static final int CENTIM
public static final int CENCRC
public static final int CENSIZ
public static final int CENLEN
public static final int CENNAM
public static final int CENEXT
public static final int CENCOM
public static final int CENDSK
public static final int CENATT
public static final int CENATX
public static final int CENOFF
public static final long ENDSIG
public static final int ENDHDR
public static final int ENDSUB
public static final int ENDTOT
public static final int ENDSIZ
public static final int ENDOFF
public static final int ENDCOM
public ZipEntry(String name)
name
- the name. May include directory components separated
by '/'.NullPointerException
- when name is null.IllegalArgumentException
- when name is bigger then 65535 chars.public String getName()
public void setTime(long time)
public long getTime()
public void setSize(long size)
IllegalArgumentException
- if size is not in 0..0xffffffffLpublic long getSize()
public void setCompressedSize(long csize)
public long getCompressedSize()
public void setCrc(long crc)
IllegalArgumentException
- if crc is not in 0..0xffffffffLpublic long getCrc()
public void setMethod(int method)
IllegalArgumentException
- if method is not supported.ZipOutputStream.DEFLATED
,
ZipOutputStream.STORED
public int getMethod()
public void setExtra(byte[] extra)
IllegalArgumentException
- if extra is longer than 0xffff bytes.public byte[] getExtra()
public void setComment(String comment)
IllegalArgumentException
- if comment is longer than 0xffff.public String getComment()
public boolean isDirectory()
public String toString()
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)