|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.zip.AbstractUnicodeExtraField
public abstract class AbstractUnicodeExtraField
A common base class for Unicode extra information extra fields.
Constructor Summary | |
---|---|
protected |
AbstractUnicodeExtraField()
|
protected |
AbstractUnicodeExtraField(java.lang.String text,
byte[] bytes)
Assemble as unicode extension from the name/comment and encoding of the orginal zip entry. |
protected |
AbstractUnicodeExtraField(java.lang.String text,
byte[] bytes,
int off,
int len)
Assemble as unicode extension from the name/comment and encoding of the orginal zip entry. |
Method Summary | |
---|---|
byte[] |
getCentralDirectoryData()
The actual data to put into central directory - without Header-ID or length specifier. |
ZipShort |
getCentralDirectoryLength()
Length of the extra field in the central directory - without Header-ID or length specifier. |
byte[] |
getLocalFileDataData()
The actual data to put into local file data - without Header-ID or length specifier. |
ZipShort |
getLocalFileDataLength()
Length of the extra field in the local file data - without Header-ID or length specifier. |
long |
getNameCRC32()
|
byte[] |
getUnicodeName()
|
void |
parseFromLocalFileData(byte[] buffer,
int offset,
int length)
Populate data from this array as if it was in local file data. |
void |
setNameCRC32(long nameCRC32)
|
void |
setUnicodeName(byte[] unicodeName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.tools.zip.ZipExtraField |
---|
getHeaderId |
Constructor Detail |
---|
protected AbstractUnicodeExtraField()
protected AbstractUnicodeExtraField(java.lang.String text, byte[] bytes, int off, int len)
text
- The file name or comment.bytes
- The encoded of the filename or comment in the zip
file.off
- The offset of the encoded filename or comment in
bytes
.len
- The length of the encoded filename or commentin
bytes
.protected AbstractUnicodeExtraField(java.lang.String text, byte[] bytes)
text
- The file name or comment.bytes
- The encoded of the filename or comment in the zip
file.Method Detail |
---|
public long getNameCRC32()
public void setNameCRC32(long nameCRC32)
nameCRC32
- The CRC32 checksum of the filename as encoded
in the central directory of the zip file to set.public byte[] getUnicodeName()
public void setUnicodeName(byte[] unicodeName)
unicodeName
- The utf-8 encoded name to set.public byte[] getCentralDirectoryData()
ZipExtraField
getCentralDirectoryData
in interface ZipExtraField
public ZipShort getCentralDirectoryLength()
ZipExtraField
getCentralDirectoryLength
in interface ZipExtraField
public byte[] getLocalFileDataData()
ZipExtraField
getLocalFileDataData
in interface ZipExtraField
public ZipShort getLocalFileDataLength()
ZipExtraField
getLocalFileDataLength
in interface ZipExtraField
public void parseFromLocalFileData(byte[] buffer, int offset, int length) throws java.util.zip.ZipException
ZipExtraField
parseFromLocalFileData
in interface ZipExtraField
buffer
- an array of bytesoffset
- the start offsetlength
- the number of bytes in the array from offset
java.util.zip.ZipException
- on error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |