Skip to content

Most visited

Recently visited

navigation
Added in API level 1

Pack200.Packer

public static interface Pack200.Packer

java.util.jar.Pack200.Packer


The interface defining the API for converting a JAR file to an output stream in the Pack200 format.

Summary

Constants

String CLASS_ATTRIBUTE_PFX

the format of a class attribute name.

String CODE_ATTRIBUTE_PFX

the format of a code attribute name.

String DEFLATE_HINT

the deflation hint to set in the output archive.

String EFFORT

the indicated amount of effort to use in compressing the archive.

String ERROR

a String representation for error.

String FALSE

a String representation of false.

String FIELD_ATTRIBUTE_PFX

the format of a field attribute name.

String KEEP

a String representation for keep.

String KEEP_FILE_ORDER

decide if all elements shall transmit in their original order.

String LATEST

a String representation for latest.

String METHOD_ATTRIBUTE_PFX

the format of a method attribute name.

String MODIFICATION_TIME

if it shall attempt to determine the latest modification time if this is set to LATEST.

String PASS

a String representation of pass.

String PASS_FILE_PFX

the file that will not be compressed.

String PROGRESS

packer progress as a percentage.

String SEGMENT_LIMIT

The number of bytes of each archive segment.

String STRIP

a String representation of strip.

String TRUE

a String representation of true.

String UNKNOWN_ATTRIBUTE

the action to take if an unknown attribute is encountered.

Public methods

abstract void addPropertyChangeListener(PropertyChangeListener listener)

add a listener for PropertyChange events

abstract void pack(JarFile in, OutputStream out)

Pack the specified JAR file to the specified output stream.

abstract void pack(JarInputStream in, OutputStream out)

Pack the data from the specified jar input stream to the specified output stream.

abstract SortedMap<StringString> properties()

Returns a sorted map of the properties of this packer.

abstract void removePropertyChangeListener(PropertyChangeListener listener)

remove a listener

Constants

CLASS_ATTRIBUTE_PFX

Added in API level 1
String CLASS_ATTRIBUTE_PFX

the format of a class attribute name.

Constant Value: "pack.class.attribute."

CODE_ATTRIBUTE_PFX

Added in API level 1
String CODE_ATTRIBUTE_PFX

the format of a code attribute name.

Constant Value: "pack.code.attribute."

DEFLATE_HINT

Added in API level 1
String DEFLATE_HINT

the deflation hint to set in the output archive.

Constant Value: "pack.deflate.hint"

EFFORT

Added in API level 1
String EFFORT

the indicated amount of effort to use in compressing the archive.

Constant Value: "pack.effort"

ERROR

Added in API level 1
String ERROR

a String representation for error.

Constant Value: "error"

FALSE

Added in API level 1
String FALSE

a String representation of false.

Constant Value: "false"

FIELD_ATTRIBUTE_PFX

Added in API level 1
String FIELD_ATTRIBUTE_PFX

the format of a field attribute name.

Constant Value: "pack.field.attribute."

KEEP

Added in API level 1
String KEEP

a String representation for keep.

Constant Value: "keep"

KEEP_FILE_ORDER

Added in API level 1
String KEEP_FILE_ORDER

decide if all elements shall transmit in their original order.

Constant Value: "pack.keep.file.order"

LATEST

Added in API level 1
String LATEST

a String representation for latest.

Constant Value: "latest"

METHOD_ATTRIBUTE_PFX

Added in API level 1
String METHOD_ATTRIBUTE_PFX

the format of a method attribute name.

Constant Value: "pack.method.attribute."

MODIFICATION_TIME

Added in API level 1
String MODIFICATION_TIME

if it shall attempt to determine the latest modification time if this is set to LATEST.

Constant Value: "pack.modification.time"

PASS

Added in API level 1
String PASS

a String representation of pass.

Constant Value: "pass"

PASS_FILE_PFX

Added in API level 1
String PASS_FILE_PFX

the file that will not be compressed.

Constant Value: "pack.pass.file."

PROGRESS

Added in API level 1
String PROGRESS

packer progress as a percentage.

Constant Value: "pack.progress"

SEGMENT_LIMIT

Added in API level 1
String SEGMENT_LIMIT

The number of bytes of each archive segment.

Constant Value: "pack.segment.limit"

STRIP

Added in API level 1
String STRIP

a String representation of strip.

Constant Value: "strip"

TRUE

Added in API level 1
String TRUE

a String representation of true.

Constant Value: "true"

UNKNOWN_ATTRIBUTE

Added in API level 1
String UNKNOWN_ATTRIBUTE

the action to take if an unknown attribute is encountered.

Constant Value: "pack.unknown.attribute"

Public methods

addPropertyChangeListener

Added in API level 3
void addPropertyChangeListener (PropertyChangeListener listener)

add a listener for PropertyChange events

Parameters
listener PropertyChangeListener: the listener to listen if PropertyChange events occurs

pack

Added in API level 1
void pack (JarFile in, 
                OutputStream out)

Pack the specified JAR file to the specified output stream.

Parameters
in JarFile: JAR file to be compressed.
out OutputStream: stream of compressed data.
Throws
IOException if I/O exception occurs.

pack

Added in API level 1
void pack (JarInputStream in, 
                OutputStream out)

Pack the data from the specified jar input stream to the specified output stream.

Parameters
in JarInputStream: stream of uncompressed JAR data.
out OutputStream: stream of compressed data.
Throws
IOException if I/O exception occurs.

properties

Added in API level 1
SortedMap<StringString> properties ()

Returns a sorted map of the properties of this packer.

Returns
SortedMap<StringString> the properties of the packer.

removePropertyChangeListener

Added in API level 3
void removePropertyChangeListener (PropertyChangeListener listener)

remove a listener

Parameters
listener PropertyChangeListener: listener to remove
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.