java.lang.Object
kala.compress.harmony.unpack200.Archive

public class Archive extends Object
Archive is the main entry point to unpack200. An archive is constructed with either two file names, a pack file and an output file name or an input stream and an output streams. Then unpack() is called, to unpack the pack200 archive.
  • Field Details

    • MAGIC

      private static final int[] MAGIC
    • inputStream

      private BoundedInputStream inputStream
    • outputStream

      private final JarOutputStream outputStream
    • removePackFile

      private boolean removePackFile
    • logLevel

      private int logLevel
    • logFile

      private FileOutputStream logFile
    • overrideDeflateHint

      private boolean overrideDeflateHint
    • deflateHint

      private boolean deflateHint
    • inputPath

      private final Path inputPath
    • inputSize

      private final long inputSize
    • outputFileName

      private final String outputFileName
    • closeStreams

      private final boolean closeStreams
  • Constructor Details

  • Method Details

    • available

      private boolean available(InputStream inputStream) throws IOException
      Throws:
      IOException
    • setDeflateHint

      public void setDeflateHint(boolean deflateHint)
    • setLogFile

      public void setLogFile(String logFileName) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • setLogFile

      public void setLogFile(String logFileName, boolean append) throws FileNotFoundException
      Throws:
      FileNotFoundException
    • setQuiet

      public void setQuiet(boolean quiet)
    • setRemovePackFile

      public void setRemovePackFile(boolean removePackFile)
      If removePackFile is set to true, the input file is deleted after unpacking.
      Parameters:
      removePackFile - If true, the input file is deleted after unpacking.
    • setVerbose

      public void setVerbose(boolean verbose)
    • unpack

      public void unpack() throws Pack200Exception, IOException
      Unpacks the Archive from the input file to the output file
      Throws:
      Pack200Exception - TODO
      IOException - TODO