@NotThreadSafe @DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) final class DefaultExtraField extends ExtraField
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
data |
private short |
headerId |
WINZIP_AES_ID, ZIP64_HEADER_ID| Constructor and Description |
|---|
DefaultExtraField(int headerId)
Constructs a new Extra Field.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
getDataSize()
Returns the Data Size of this Extra Field.
|
(package private) int |
getHeaderId()
Returns the Header ID (type) of this Extra Field.
|
(package private) void |
readFrom(byte[] src,
int off,
int size)
Initializes this Extra Field by deserializing a Data Block of
size bytes from the
byte array data at the zero based offset off. |
(package private) void |
writeTo(byte[] dst,
int off)
Serializes a Data Block of
ExtraField.getDataSize() bytes to the
byte array data at the zero based offset off. |
create, getDataBlock, registerDefaultExtraField(int headerId)
headerId - an unsigned short integer (two bytes) indicating the
type of the Extra Field.int getDataSize()
ExtraFieldExtraField.readFrom(byte[], int, int).getDataSize in class ExtraField0 if unknown.ExtraField.getDataBlock()int getHeaderId()
ExtraFieldgetHeaderId in class ExtraFieldvoid readFrom(byte[] src,
int off,
int size)
ExtraFieldsize bytes from the
byte array data at the zero based offset off.
Upon return, this Extra Field shall not access data
subsequently and ExtraField.getDataSize() must equal size.readFrom in class ExtraFieldsrc - The byte array to read the Data Block from.off - The zero based offset in the byte array where the first byte
of the Data Block is read from.size - The length of the Data Block in bytes.ExtraField.getDataSize()void writeTo(byte[] dst,
int off)
ExtraFieldExtraField.getDataSize() bytes to the
byte array data at the zero based offset off.
Upon return, this Extra Field shall not access data
subsequently.writeTo in class ExtraFielddst - The byte array to write the Data Block to.off - The zero based offset in the byte array where the first byte
of the Data Block is written to.ExtraField.getDataSize()Copyright © 2004-2011 Schlichtherle IT Services. All Rights Reserved.