- java.lang.Object
-
- kala.compress.harmony.pack200.PackingUtils
-
public class PackingUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classPackingUtils.PackingLogger
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.FileHandlerfileHandlerprivate static PackingUtils.PackingLoggerpackingLogger
-
Constructor Summary
Constructors Constructor Description PackingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconfig(PackingOptions options)static voidcopyThroughJar(java.util.jar.JarFile jarFile, java.io.OutputStream outputStream)When effort is 0, the packer copys through the original jar file without compressionstatic voidcopyThroughJar(java.util.jar.JarInputStream jarInputStream, java.io.OutputStream outputStream)When effort is 0, the packer copies through the original jar input stream without compressionstatic java.util.List<Archive.PackingFile>getPackingFileListFromJar(java.util.jar.JarFile jarFile, boolean keepFileOrder)static java.util.List<Archive.PackingFile>getPackingFileListFromJar(java.util.jar.JarInputStream jarInputStream, boolean keepFileOrder)static voidlog(java.lang.String message)private static byte[]readJarEntry(java.util.jar.JarEntry jarEntry, java.io.InputStream inputStream)private static voidreorderPackingFiles(java.util.List<Archive.PackingFile> packingFileList)
-
-
-
Field Detail
-
packingLogger
private static PackingUtils.PackingLogger packingLogger
-
fileHandler
private static java.util.logging.FileHandler fileHandler
-
-
Method Detail
-
config
public static void config(PackingOptions options) throws java.io.IOException
- Throws:
java.io.IOException
-
copyThroughJar
public static void copyThroughJar(java.util.jar.JarFile jarFile, java.io.OutputStream outputStream) throws java.io.IOExceptionWhen effort is 0, the packer copys through the original jar file without compression- Parameters:
jarFile- the input jar fileoutputStream- the jar output stream- Throws:
java.io.IOException- If an I/O error occurs.
-
copyThroughJar
public static void copyThroughJar(java.util.jar.JarInputStream jarInputStream, java.io.OutputStream outputStream) throws java.io.IOExceptionWhen effort is 0, the packer copies through the original jar input stream without compression- Parameters:
jarInputStream- the jar input streamoutputStream- the jar output stream- Throws:
java.io.IOException- If an I/O error occurs.
-
getPackingFileListFromJar
public static java.util.List<Archive.PackingFile> getPackingFileListFromJar(java.util.jar.JarFile jarFile, boolean keepFileOrder) throws java.io.IOException
- Throws:
java.io.IOException
-
getPackingFileListFromJar
public static java.util.List<Archive.PackingFile> getPackingFileListFromJar(java.util.jar.JarInputStream jarInputStream, boolean keepFileOrder) throws java.io.IOException
- Throws:
java.io.IOException
-
log
public static void log(java.lang.String message)
-
readJarEntry
private static byte[] readJarEntry(java.util.jar.JarEntry jarEntry, java.io.InputStream inputStream) throws java.io.IOException- Throws:
java.io.IOException
-
reorderPackingFiles
private static void reorderPackingFiles(java.util.List<Archive.PackingFile> packingFileList)
-
-