Top Description Fields Constructors Methods
org.apache.tools.zip

public Class UnicodeCommentExtraField

extends AbstractUnicodeExtraField
Class Inheritance

Info-ZIP Unicode Comment Extra Field (0x6375):

Stores the UTF-8 version of the file comment as stored in the central directory header.

See PKWARE's APPNOTE.TXT, section 4.6.8.

Field Summary

Modifier and TypeField and Description
public static final ZipShort

Constructor Summary

AccessConstructor and Description
public
public
UnicodeCommentExtraField(final String
The file name
text
,
final byte[]
the bytes actually written to the archive
bytes
,
final int
The offset of the encoded comment in bytes.
off
,
final int
The length of the encoded comment or comment in bytes.
len
)

Assemble as unicode comment extension from the name given as text as well as the encoded bytes actually written to the archive.

public
UnicodeCommentExtraField(final String
The file comment
comment
,
final byte[]
the bytes actually written to the archive
bytes
)

Assemble as unicode comment extension from the comment given as text as well as the bytes actually written to the archive.

Method Summary

Modifier and TypeMethod and Description
public ZipShort
Inherited from org.apache.tools.zip.AbstractUnicodeExtraField:
getCentralDirectoryDatagetCentralDirectoryLengthgetLocalFileDataDatagetLocalFileDataLengthgetNameCRC32getUnicodeNameparseFromLocalFileDatasetNameCRC32setUnicodeName

Field Detail

UCOM_IDback to summary
public static final ZipShort UCOM_ID

Constructor Detail

UnicodeCommentExtraFieldback to summary
public UnicodeCommentExtraField()
UnicodeCommentExtraFieldback to summary
public UnicodeCommentExtraField(final String text, final byte[] bytes, final int off, final int len)

Assemble as unicode comment extension from the name given as text as well as the encoded bytes actually written to the archive.

Parameters
text:String

The file name

bytes:byte[]

the bytes actually written to the archive

off:int

The offset of the encoded comment in bytes.

len:int

The length of the encoded comment or comment in bytes.

UnicodeCommentExtraFieldback to summary
public UnicodeCommentExtraField(final String comment, final byte[] bytes)

Assemble as unicode comment extension from the comment given as text as well as the bytes actually written to the archive.

Parameters
comment:String

The file comment

bytes:byte[]

the bytes actually written to the archive

Method Detail

getHeaderIdback to summary
public ZipShort getHeaderId()

Implements org.apache.tools.zip.ZipExtraField.getHeaderId.

Doc from org.apache.tools.zip.ZipExtraField.getHeaderId.

The Header-ID.

Returns:ZipShort

the header id