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

public final Class JarMarker

extends Object
implements ZipExtraField
Class Inheritance
All Implemented Interfaces
org.apache.tools.zip.ZipExtraField
Imports
java.util.zip.ZipException

If this extra field is added as the very first extra field of the archive, Solaris will consider it an executable jar file.
Since
Ant 1.6.3

Field Summary

Modifier and TypeField and Description
private static final JarMarker
private static final ZipShort
private static final byte[]
private static final ZipShort

Constructor Summary

AccessConstructor and Description
public
JarMarker()

No-arg constructor

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

the data
getCentralDirectoryData
()

Implements org.apache.tools.zip.ZipExtraField.getCentralDirectoryData.

The actual data to put central directory - without Header-ID or length specifier.
public ZipShort

Returns:

0
getCentralDirectoryLength
()

Implements org.apache.tools.zip.ZipExtraField.getCentralDirectoryLength.

Length of the extra field in the central directory - without Header-ID or length specifier.
public ZipShort

Returns:

the header id
getHeaderId
()

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

The Header-ID.
public static JarMarker

Returns:

the DEFAULT jarmaker.
getInstance
()

Since JarMarker is stateless we can always use the same instance.

public byte[]

Returns:

the data
getLocalFileDataData
()

Implements org.apache.tools.zip.ZipExtraField.getLocalFileDataData.

The actual data to put into local file data - without Header-ID or length specifier.
public ZipShort

Returns:

0
getLocalFileDataLength
()

Implements org.apache.tools.zip.ZipExtraField.getLocalFileDataLength.

Length of the extra field in the local file data - without Header-ID or length specifier.
public void
parseFromLocalFileData(byte[]
an array of bytes
data
,
int
the start offset
offset
,
int
the number of bytes in the array from offset
length
)

Implements org.apache.tools.zip.ZipExtraField.parseFromLocalFileData.

Populate data from this array as if it was in local file data.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULTback to summary
private static final JarMarker DEFAULT
IDback to summary
private static final ZipShort ID
NO_BYTESback to summary
private static final byte[] NO_BYTES
NULLback to summary
private static final ZipShort NULL

Constructor Detail

JarMarkerback to summary
public JarMarker()

No-arg constructor

Method Detail

getCentralDirectoryDataback to summary
public byte[] getCentralDirectoryData()

Implements org.apache.tools.zip.ZipExtraField.getCentralDirectoryData.

The actual data to put central directory - without Header-ID or length specifier.

Returns:byte[]

the data

getCentralDirectoryLengthback to summary
public ZipShort getCentralDirectoryLength()

Implements org.apache.tools.zip.ZipExtraField.getCentralDirectoryLength.

Length of the extra field in the central directory - without Header-ID or length specifier.

Returns:ZipShort

0

getHeaderIdback to summary
public ZipShort getHeaderId()

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

The Header-ID.

Returns:ZipShort

the header id

getInstanceback to summary
public static JarMarker getInstance()

Since JarMarker is stateless we can always use the same instance.

Returns:JarMarker

the DEFAULT jarmaker.

getLocalFileDataDataback to summary
public byte[] getLocalFileDataData()

Implements org.apache.tools.zip.ZipExtraField.getLocalFileDataData.

The actual data to put into local file data - without Header-ID or length specifier.

Returns:byte[]

the data

Since
1.1
getLocalFileDataLengthback to summary
public ZipShort getLocalFileDataLength()

Implements org.apache.tools.zip.ZipExtraField.getLocalFileDataLength.

Length of the extra field in the local file data - without Header-ID or length specifier.

Returns:ZipShort

0

parseFromLocalFileDataback to summary
public void parseFromLocalFileData(byte[] data, int offset, int length) throws ZipException

Implements org.apache.tools.zip.ZipExtraField.parseFromLocalFileData.

Populate data from this array as if it was in local file data.

Parameters
data:byte[]

an array of bytes

offset:int

the start offset

length:int

the number of bytes in the array from offset

Exceptions
ZipException:
on error