FileDocCategorySizeDatePackage
JarMarker.javaAPI DocApache Ant 1.703120Wed Dec 13 06:16:22 GMT 2006org.apache.tools.zip

JarMarker

public final class JarMarker extends Object implements ZipExtraField
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

Fields Summary
private static final ZipShort
ID
private static final ZipShort
NULL
private static final byte[]
NO_BYTES
private static final JarMarker
DEFAULT
Constructors Summary
public JarMarker()
No-arg constructor


       
      
        // empty
    
Methods Summary
public byte[]getCentralDirectoryData()
The actual data to put central directory - without Header-ID or length specifier.

return
the data

        return NO_BYTES;
    
public ZipShortgetCentralDirectoryLength()
Length of the extra field in the central directory - without Header-ID or length specifier.

return
0

        return NULL;
    
public ZipShortgetHeaderId()
The Header-ID.

return
the header id

        return ID;
    
public static org.apache.tools.zip.JarMarkergetInstance()
Since JarMarker is stateless we can always use the same instance.

return
the DEFAULT jarmaker.

        return DEFAULT;
    
public byte[]getLocalFileDataData()
The actual data to put into local file data - without Header-ID or length specifier.

return
the data
since
1.1

        return NO_BYTES;
    
public ZipShortgetLocalFileDataLength()
Length of the extra field in the local file data - without Header-ID or length specifier.

return
0

        return NULL;
    
public voidparseFromLocalFileData(byte[] data, int offset, int length)
Populate data from this array as if it was in local file data.

param
data an array of bytes
param
offset the start offset
param
length the number of bytes in the array from offset
throws
ZipException on error

        if (length != 0) {
            throw new ZipException("JarMarker doesn't expect any data");
        }