Package org.apache.tools.zip
Class JarMarker
java.lang.Object
org.apache.tools.zip.JarMarker
- All Implemented Interfaces:
- 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
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]The actual data to put central directory - without Header-ID or length specifier.Length of the extra field in the central directory - without Header-ID or length specifier.The Header-ID.static JarMarkerSince JarMarker is stateless we can always use the same instance.byte[]The actual data to put into local file data - without Header-ID or length specifier.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.
- 
Constructor Details- 
JarMarkerpublic JarMarker()No-arg constructor
 
- 
- 
Method Details- 
getInstanceSince JarMarker is stateless we can always use the same instance.- Returns:
- the DEFAULT jarmaker.
 
- 
getHeaderIdThe Header-ID.- Specified by:
- getHeaderIdin interface- ZipExtraField
- Returns:
- the header id
 
- 
getLocalFileDataLengthLength of the extra field in the local file data - without Header-ID or length specifier.- Specified by:
- getLocalFileDataLengthin interface- ZipExtraField
- Returns:
- 0
 
- 
getCentralDirectoryLengthLength 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
 
- 
parseFromLocalFileDataPopulate 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:
- ZipException- on error
 
 
-