public class

UnpackerImpl

extends Object
implements Pack200.Unpacker
java.lang.Object
   ↳ com.sun.java.util.jar.pack.UnpackerImpl

Summary

[Expand]
Inherited Constants
From interface java.util.jar.Pack200.Unpacker
Public Constructors
UnpackerImpl()
Public Methods
void addPropertyChangeListener(PropertyChangeListener listener)
Register a listener for changes to options.
SortedMap properties()
Get the set of options for the pack and unpack engines.
void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for the PropertyChange event.
String toString()
Returns a string representation of the object.
void unpack(InputStream in0, JarOutputStream out)
Takes a packed-stream InputStream, and writes to a JarOutputStream.
void unpack(File in, JarOutputStream out)
Takes an input File containing the pack file, and generates a JarOutputStream.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.jar.Pack200.Unpacker

Public Constructors

public UnpackerImpl ()

Public Methods

public void addPropertyChangeListener (PropertyChangeListener listener)

Register a listener for changes to options.

Parameters
listener An object to be invoked when a property is changed.

public SortedMap properties ()

Get the set of options for the pack and unpack engines.

Returns
  • A sorted association of option key strings to option values.

public void removePropertyChangeListener (PropertyChangeListener listener)

Remove a listener for the PropertyChange event.

Parameters
listener The PropertyChange listener to be removed.

public String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
  • a string representation of the object.

public void unpack (InputStream in0, JarOutputStream out)

Takes a packed-stream InputStream, and writes to a JarOutputStream. Internally the entire buffer must be read, it may be more efficient to read the packed-stream to a file and pass the File object, in the alternate method described below.

Closes its input but not its output. (The output can accumulate more elements.)

Parameters
in0 an InputStream.
out a JarOutputStream.
Throws
IOException if an error is encountered.

public void unpack (File in, JarOutputStream out)

Takes an input File containing the pack file, and generates a JarOutputStream.

Does not close its output. (The output can accumulate more elements.)

Parameters
in a File.
out a JarOutputStream.
Throws
IOException if an error is encountered.