Class PackingUtils


  • public class PackingUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PackingUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void config​(PackingOptions options)  
      static void copyThroughJar​(java.util.jar.JarFile jarFile, java.io.OutputStream outputStream)
      When effort is 0, the packer copys through the original jar file without compression
      static void copyThroughJar​(java.util.jar.JarInputStream jarInputStream, java.io.OutputStream outputStream)
      When effort is 0, the packer copies through the original jar input stream without compression
      static 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 void log​(java.lang.String message)  
      private static byte[] readJarEntry​(java.util.jar.JarEntry jarEntry, java.io.InputStream inputStream)  
      private static void reorderPackingFiles​(java.util.List<Archive.PackingFile> packingFileList)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fileHandler

        private static java.util.logging.FileHandler fileHandler
    • Constructor Detail

      • PackingUtils

        public PackingUtils()
    • 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.IOException
        When effort is 0, the packer copys through the original jar file without compression
        Parameters:
        jarFile - the input jar file
        outputStream - 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.IOException
        When effort is 0, the packer copies through the original jar input stream without compression
        Parameters:
        jarInputStream - the jar input stream
        outputStream - 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)