Package io.pack200
Class PackerImpl
- java.lang.Object
-
- io.pack200.PackerImpl
-
- All Implemented Interfaces:
Pack200.Packer
public class PackerImpl extends java.lang.Object implements Pack200.Packer
-
-
Field Summary
-
Fields inherited from interface io.pack200.Pack200.Packer
CLASS_ATTRIBUTE_PFX, CODE_ATTRIBUTE_PFX, DEFLATE_HINT, EFFORT, ERROR, FALSE, FIELD_ATTRIBUTE_PFX, KEEP, KEEP_FILE_ORDER, LATEST, METHOD_ATTRIBUTE_PFX, MODIFICATION_TIME, PASS, PASS_FILE_PFX, PROGRESS, SEGMENT_LIMIT, STRIP, TRUE, UNKNOWN_ATTRIBUTE
-
-
Constructor Summary
Constructors Constructor Description PackerImpl()
Constructs a Packer object and sets the initial state of the packer engines.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
pack(java.util.jar.JarFile in, java.io.OutputStream out)
Takes a JarFile and converts into a pack-stream.void
pack(java.util.jar.JarInputStream in, java.io.OutputStream out)
Takes a JarInputStream and converts into a pack-stream.java.util.SortedMap<java.lang.String,java.lang.String>
properties()
Get the set of options for the pack and unpack engines.
-
-
-
Method Detail
-
properties
public java.util.SortedMap<java.lang.String,java.lang.String> properties()
Get the set of options for the pack and unpack engines.- Specified by:
properties
in interfacePack200.Packer
- Returns:
- A sorted association of option key strings to option values.
-
pack
public void pack(java.util.jar.JarFile in, java.io.OutputStream out) throws java.io.IOException
Takes a JarFile and converts into a pack-stream.Closes its input but not its output. (Pack200 archives are appendable.)
- Specified by:
pack
in interfacePack200.Packer
- Parameters:
in
- a JarFileout
- an OutputStream- Throws:
java.io.IOException
- if an error is encountered.
-
pack
public void pack(java.util.jar.JarInputStream in, java.io.OutputStream out) throws java.io.IOException
Takes a JarInputStream and converts into a pack-stream.Closes its input but not its output. (Pack200 archives are appendable.)
The modification time and deflation hint attributes are not available, for the jar-manifest file and the directory containing the file.
- Specified by:
pack
in interfacePack200.Packer
- Parameters:
in
- a JarInputStreamout
- an OutputStream- Throws:
java.io.IOException
- if an error is encountered.- See Also:
Pack200.Packer.MODIFICATION_TIME
,Pack200.Packer.DEFLATE_HINT
-
-