Interface Pack200.Packer
- All Known Implementing Classes:
Pack200PackerAdapter
- Enclosing class:
- Pack200
public static interface Pack200.Packer
The interface defining the API for converting a JAR file to an output stream in the Pack200 format.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The format of a class attribute name.static final String
The format of a code attribute name.static final String
The deflation hint to set in the output archive.static final String
The indicated amount of effort to use in compressing the archive.static final String
a String representation forerror
.static final String
a String representation offalse
.static final String
The format of a field attribute name.static final String
The String representation forkeep
.static final String
Decide if all elements shall transmit in their original order.static final String
The String representation forlatest
.static final String
The format of a method attribute name.static final String
If it shall attempt to determine the latest modification time if this is set toLATEST
.static final String
The String representation ofpass
.static final String
The file that will not be compressed.static final String
Packer progress as a percentage.static final String
The number of bytes of each archive segment.static final String
The String representation ofstrip
.static final String
The String representation oftrue
.static final String
The action to take if an unknown attribute is encountered. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a listener for PropertyChange eventsvoid
pack
(JarFile in, OutputStream out) Packs the specified JAR file to the specified output stream.void
pack
(JarInputStream in, OutputStream out) Packs the data from the specified jar input stream to the specified output stream.Gets a sorted map of the properties of this packer.void
Removes a listener
-
Field Details
-
CLASS_ATTRIBUTE_PFX
The format of a class attribute name.- See Also:
-
CODE_ATTRIBUTE_PFX
The format of a code attribute name.- See Also:
-
DEFLATE_HINT
The deflation hint to set in the output archive.- See Also:
-
EFFORT
The indicated amount of effort to use in compressing the archive.- See Also:
-
ERROR
a String representation forerror
.- See Also:
-
FALSE
a String representation offalse
.- See Also:
-
FIELD_ATTRIBUTE_PFX
The format of a field attribute name.- See Also:
-
KEEP
The String representation forkeep
.- See Also:
-
KEEP_FILE_ORDER
Decide if all elements shall transmit in their original order.- See Also:
-
LATEST
The String representation forlatest
.- See Also:
-
METHOD_ATTRIBUTE_PFX
The format of a method attribute name.- See Also:
-
MODIFICATION_TIME
If it shall attempt to determine the latest modification time if this is set toLATEST
.- See Also:
-
PASS
The String representation ofpass
.- See Also:
-
PASS_FILE_PFX
The file that will not be compressed.- See Also:
-
PROGRESS
Packer progress as a percentage.- See Also:
-
SEGMENT_LIMIT
The number of bytes of each archive segment.- See Also:
-
STRIP
The String representation ofstrip
.- See Also:
-
TRUE
The String representation oftrue
.- See Also:
-
UNKNOWN_ATTRIBUTE
The action to take if an unknown attribute is encountered.- See Also:
-
-
Method Details
-
addPropertyChangeListener
Adds a listener for PropertyChange events- Parameters:
listener
- the listener to listen if PropertyChange events occurs
-
pack
Packs the specified JAR file to the specified output stream.- Parameters:
in
- JAR file to be compressed.out
- stream of compressed data.- Throws:
IOException
- if I/O exception occurs.
-
pack
Packs the data from the specified jar input stream to the specified output stream.- Parameters:
in
- stream of uncompressed JAR data.out
- stream of compressed data.- Throws:
IOException
- if I/O exception occurs.
-
properties
Gets a sorted map of the properties of this packer.- Returns:
- the properties of the packer.
-
removePropertyChangeListener
Removes a listener- Parameters:
listener
- listener to remove
-