|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.zip.ZipEntry
public class ZipEntry
ZipEntry represents an entry in a zip file.
ZipFile,
ZipInputStream| Nested Class Summary | |
|---|---|
(package private) static class |
ZipEntry.LittleEndianReader
|
| Field Summary | |
|---|---|
(package private) String |
comment
|
(package private) int |
commentLen
|
(package private) long |
compressedSize
|
(package private) int |
compressionMethod
|
(package private) long |
crc
|
static int |
DEFLATED
Zip entry state: Deflated |
(package private) byte[] |
extra
|
(package private) int |
extraLen
|
(package private) long |
mLocalHeaderRelOffset
|
(package private) int |
modDate
|
(package private) String |
name
|
(package private) int |
nameLen
|
(package private) long |
size
|
static int |
STORED
Zip entry state: Stored |
(package private) int |
time
|
(package private) static int |
USES_DATA_DESCR
|
| Fields inherited from interface java.util.zip.ZipConstants |
|---|
CENATT, CENATX, CENCOM, CENCRC, CENDSK, CENEXT, CENFLG, CENHDR, CENHOW, CENLEN, CENNAM, CENOFF, CENSIG, CENSIZ, CENTIM, CENVEM, CENVER, ENDCOM, ENDHDR, ENDOFF, ENDSIG, ENDSIZ, ENDSUB, ENDTOT, EXTCRC, EXTHDR, EXTLEN, EXTSIG, EXTSIZ, LOCCRC, LOCEXT, LOCFLG, LOCHDR, LOCHOW, LOCLEN, LOCNAM, LOCSIG, LOCSIZ, LOCTIM, LOCVER |
| Constructor Summary | |
|---|---|
ZipEntry(String name)
Constructs a new ZipEntry with the specified name. |
|
ZipEntry(ZipEntry.LittleEndianReader ler,
InputStream in)
|
|
ZipEntry(ZipEntry ze)
Constructs a new ZipEntry using the values obtained from ze. |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a shallow copy of this entry |
String |
getComment()
Gets the comment for this ZipEntry. |
long |
getCompressedSize()
Gets the compressed size of this ZipEntry. |
long |
getCrc()
Gets the crc for this ZipEntry. |
byte[] |
getExtra()
Gets the extra information for this ZipEntry. |
(package private) int |
getGPBitFlag()
|
(package private) long |
getLocalHeaderRelOffset()
|
int |
getMethod()
Gets the compression method for this ZipEntry. |
String |
getName()
Gets the name of this ZipEntry. |
long |
getSize()
Gets the uncompressed size of this ZipEntry. |
long |
getTime()
Gets the last modification time of this ZipEntry. |
int |
hashCode()
Returns the hashCode for this ZipEntry. |
boolean |
isDirectory()
Determine whether or not this ZipEntry is a directory. |
(package private) static long |
readIntLE(RandomAccessFile raf)
|
(package private) static int |
readShortLE(RandomAccessFile raf)
|
void |
setComment(String string)
Sets the comment for this ZipEntry. |
void |
setCompressedSize(long value)
Sets the compressed size for this ZipEntry. |
void |
setCrc(long value)
Sets the crc for this ZipEntry. |
(package private) void |
setDateTime(int lastModFileDate,
int lastModFileTime)
|
void |
setExtra(byte[] data)
Sets the extra information for this ZipEntry. |
(package private) void |
setGPBitFlag(int flags)
|
(package private) void |
setLocalHeaderRelOffset(long offset)
|
void |
setMethod(int value)
Sets the compression method for this ZipEntry. |
void |
setSize(long value)
Sets the uncompressed size of this ZipEntry. |
void |
setTime(long value)
Sets the last modification time of this ZipEntry. |
(package private) void |
setVersionToExtract(int version)
|
String |
toString()
Returns the string representation of this ZipEntry. |
(package private) int |
writeCDE(OutputStream out)
|
(package private) int |
writeDD(OutputStream out)
|
(package private) static void |
writeIntLE(OutputStream out,
long val)
|
(package private) int |
writeLFH(OutputStream out)
|
(package private) static void |
writeShortLE(OutputStream out,
int val)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
String name
String comment
long compressedSize
long crc
long size
int compressionMethod
int time
int modDate
byte[] extra
int nameLen
int extraLen
int commentLen
long mLocalHeaderRelOffset
static final int USES_DATA_DESCR
public static final int DEFLATED
public static final int STORED
| Constructor Detail |
|---|
public ZipEntry(String name)
name - the name of the zip entrypublic ZipEntry(ZipEntry ze)
ze - ZipEntry from which to obtain values.
ZipEntry(ZipEntry.LittleEndianReader ler,
InputStream in)
throws IOException
IOException| Method Detail |
|---|
public String getComment()
public long getCompressedSize()
public long getCrc()
public byte[] getExtra()
public int getMethod()
public String getName()
public long getSize()
public long getTime()
public boolean isDirectory()
true when this ZipEntry is a directory,
false otherwisepublic void setComment(String string)
string - the commentpublic void setCompressedSize(long value)
value - the compressed sizepublic void setCrc(long value)
value - the crc
IllegalArgumentException - if value is < 0 or > 0xFFFFFFFFLpublic void setExtra(byte[] data)
data - a byte array containing the extra information
IllegalArgumentException - when the length of data is > 0xFFFF bytespublic void setMethod(int value)
value - the compression method, either DEFLATED or STORED
IllegalArgumentException - when value is not DEFLATED or STOREDpublic void setSize(long value)
value - the uncompressed size
IllegalArgumentException - if value is < 0 or > 0xFFFFFFFFLpublic void setTime(long value)
value - the last modification time as the number of milliseconds since
Jan. 1, 1970public String toString()
toString in class Objectpublic Object clone()
clone in class Objectpublic int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object)void setVersionToExtract(int version)
int getGPBitFlag()
void setGPBitFlag(int flags)
long getLocalHeaderRelOffset()
void setLocalHeaderRelOffset(long offset)
void setDateTime(int lastModFileDate,
int lastModFileTime)
static int readShortLE(RandomAccessFile raf)
throws IOException
IOException
static long readIntLE(RandomAccessFile raf)
throws IOException
IOException
static void writeShortLE(OutputStream out,
int val)
throws IOException
IOException
static void writeIntLE(OutputStream out,
long val)
throws IOException
IOException
int writeLFH(OutputStream out)
throws IOException
IOException
int writeDD(OutputStream out)
throws IOException
IOException
int writeCDE(OutputStream out)
throws IOException
IOException
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||