Package org.apache.tools.zip
Class JarMarker
- java.lang.Object
- 
- org.apache.tools.zip.JarMarker
 
- 
- All Implemented Interfaces:
- ZipExtraField
 
 public final class JarMarker extends java.lang.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
 
- 
- 
Constructor SummaryConstructors Constructor Description JarMarker()No-arg constructor
 - 
Method SummaryModifier and Type Method Description byte[]getCentralDirectoryData()The actual data to put central directory - without Header-ID or length specifier.ZipShortgetCentralDirectoryLength()Length of the extra field in the central directory - without Header-ID or length specifier.ZipShortgetHeaderId()The Header-ID.static JarMarkergetInstance()Since JarMarker is stateless we can always use the same instance.byte[]getLocalFileDataData()The actual data to put into local file data - without Header-ID or length specifier.ZipShortgetLocalFileDataLength()Length of the extra field in the local file data - without Header-ID or length specifier.voidparseFromLocalFileData(byte[] data, int offset, int length)Populate data from this array as if it was in local file data.
 
- 
- 
- 
Method Detail- 
getInstancepublic static JarMarker getInstance() Since JarMarker is stateless we can always use the same instance.- Returns:
- the DEFAULT jarmaker.
 
 - 
getHeaderIdpublic ZipShort getHeaderId() The Header-ID.- Specified by:
- getHeaderIdin interface- ZipExtraField
- Returns:
- the header id
 
 - 
getLocalFileDataLengthpublic ZipShort getLocalFileDataLength() Length of the extra field in the local file data - without Header-ID or length specifier.- Specified by:
- getLocalFileDataLengthin interface- ZipExtraField
- Returns:
- 0
 
 - 
getCentralDirectoryLengthpublic ZipShort getCentralDirectoryLength() Length of the extra field in the central directory - without Header-ID or length specifier.- Specified by:
- getCentralDirectoryLengthin interface- ZipExtraField
- Returns:
- 0
 
 - 
getLocalFileDataDatapublic byte[] getLocalFileDataData() The actual data to put into local file data - without Header-ID or length specifier.- Specified by:
- getLocalFileDataDatain interface- ZipExtraField
- Returns:
- the data
- Since:
- 1.1
 
 - 
getCentralDirectoryDatapublic byte[] getCentralDirectoryData() The actual data to put central directory - without Header-ID or length specifier.- Specified by:
- getCentralDirectoryDatain interface- ZipExtraField
- Returns:
- the data
 
 - 
parseFromLocalFileDatapublic void parseFromLocalFileData(byte[] data, int offset, int length) throws java.util.zip.ZipExceptionPopulate data from this array as if it was in local file data.- Specified by:
- parseFromLocalFileDatain interface- ZipExtraField
- Parameters:
- data- an array of bytes
- offset- the start offset
- length- the number of bytes in the array from offset
- Throws:
- java.util.zip.ZipException- on error
 
 
- 
 
-