Top Inners Fields Constructors Methods
org.apache.commons.compress.harmony.pack200

public Class PackingUtils

extends Object
Class Inheritance
Imports
java.io.BufferedInputStream, .ByteArrayOutputStream, .IOException, .InputStream, .OutputStream, java.util.ArrayList, .Enumeration, .Iterator, .List, java.util.jar.JarEntry, .JarFile, .JarInputStream, .JarOutputStream, .Manifest, java.util.logging.FileHandler, .Level, .LogManager, .LogRecord, .Logger, .SimpleFormatter, org.apache.commons.compress.harmony.pack200.Archive.PackingFile

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static FileHandler
private static PackingUtils.PackingLogger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
config(final PackingOptions options)

public static void
copyThroughJar(final JarFile
the input jar file
jarFile
,
final OutputStream
the jar output stream
outputStream
)

When effort is 0, the packer copys through the original jar file without compression

public static void
copyThroughJar(final JarInputStream
the jar input stream
jarInputStream
,
final OutputStream
the jar output stream
outputStream
)

When effort is 0, the packer copies through the original jar input stream without compression

public static List<Archive.PackingFile>
getPackingFileListFromJar(final JarFile jarFile, final boolean keepFileOrder)

public static List<Archive.PackingFile>
getPackingFileListFromJar(final JarInputStream jarInputStream, final boolean keepFileOrder)

public static void
log(final String message)

private static byte[]
readJarEntry(final JarEntry jarEntry, final InputStream inputStream)

private static void
reorderPackingFiles(final List<Archive.PackingFile> packingFileList)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fileHandlerback to summary
private static FileHandler fileHandler
packingLoggerback to summary
private static PackingUtils.PackingLogger packingLogger

Constructor Detail

PackingUtilsback to summary
public PackingUtils()

Method Detail

configback to summary
public static void config(final PackingOptions options) throws IOException
copyThroughJarback to summary
public static void copyThroughJar(final JarFile jarFile, final OutputStream outputStream) throws IOException

When effort is 0, the packer copys through the original jar file without compression

Parameters
jarFile:JarFile

the input jar file

outputStream:OutputStream

the jar output stream

Exceptions
IOException:
If an I/O error occurs.
copyThroughJarback to summary
public static void copyThroughJar(final JarInputStream jarInputStream, final OutputStream outputStream) throws IOException

When effort is 0, the packer copies through the original jar input stream without compression

Parameters
jarInputStream:JarInputStream

the jar input stream

outputStream:OutputStream

the jar output stream

Exceptions
IOException:
If an I/O error occurs.
getPackingFileListFromJarback to summary
public static List<Archive.PackingFile> getPackingFileListFromJar(final JarFile jarFile, final boolean keepFileOrder) throws IOException
getPackingFileListFromJarback to summary
public static List<Archive.PackingFile> getPackingFileListFromJar(final JarInputStream jarInputStream, final boolean keepFileOrder) throws IOException
logback to summary
public static void log(final String message)
readJarEntryback to summary
private static byte[] readJarEntry(final JarEntry jarEntry, final InputStream inputStream) throws IOException
reorderPackingFilesback to summary
private static void reorderPackingFiles(final List<Archive.PackingFile> packingFileList)
org.apache.commons.compress.harmony.pack200 back to summary

private final Class PackingUtils.PackingLogger

extends Logger
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from java.util.logging.Logger:
globalGLOBAL_LOGGER_NAME

Constructor Summary

AccessConstructor and Description
protected
PackingLogger(final String name, final String resourceBundleName)

Method Summary

Modifier and TypeMethod and Description
public void
log(final LogRecord
the LogRecord to be published
logRecord
)

Overrides java.util.logging.Logger.log.

Log a LogRecord.
public void
setVerbose(final boolean isVerbose)

Inherited from java.util.logging.Logger:
addHandlerconfigconfigenteringenteringenteringexitingexitingfinefinefinerfinerfinestfinestgetAnonymousLoggergetAnonymousLoggergetFiltergetGlobalgetHandlersgetLevelgetLoggergetLoggergetNamegetParentgetResourceBundlegetResourceBundleNamegetUseParentHandlersinfoinfoisLoggablelogloglogloglogloglogplogplogplogplogplogplogrblogrblogrblogrblogrblogrblogrblogrbremoveHandlersetFiltersetLevelsetParentsetResourceBundlesetUseParentHandlerssevereseverethrowingwarningwarning

Field Detail

verboseback to summary
private boolean verbose

Constructor Detail

PackingLoggerback to summary
protected PackingLogger(final String name, final String resourceBundleName)

Method Detail

logback to summary
public void log(final LogRecord logRecord)

Overrides java.util.logging.Logger.log.

Doc from java.util.logging.Logger.log.

Log a LogRecord.

All the other logging methods in this class call through this method to actually perform any logging. Subclasses can override this single method to capture all log activity.

Parameters
logRecord:LogRecord

the LogRecord to be published

Annotations
@Override
setVerboseback to summary
public void setVerbose(final boolean isVerbose)