org.apache.commons.compress.harmony.unpack200

## Class Archive

- java.lang.Object
- - org.apache.commons.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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Archive(InputStream inputStream, JarOutputStream outputStream)` Creates an Archive with streams for the input and output files.
    `Archive(String inputFile, String outputFile)` Creates an Archive with the given input and output file names.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setDeflateHint(boolean deflateHint)`
    `void` | `setLogFile(String logFileName)`
    `void` | `setLogFile(String logFileName, boolean append)`
    `void` | `setQuiet(boolean quiet)`
    `void` | `setRemovePackFile(boolean removePackFile)` If removePackFile is set to true, the input file is deleted after unpacking.
    `void` | `setVerbose(boolean verbose)`
    `void` | `unpack()` Unpacks the Archive from the input file to the output file

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Archive

          public Archive(String inputFile,
                         String outputFile)
                  throws FileNotFoundException,
                         IOException

      Creates an Archive with the given input and output file names.
      Parameters:
        `inputFile` - TODO
        `outputFile` - TODO
      Throws:
        `FileNotFoundException` - if the input file does not exist
        `FileNotFoundException` - TODO
        `IOException` - TODO

    - #### Archive

          public Archive(InputStream inputStream,
                         JarOutputStream outputStream)
                  throws IOException

      Creates an Archive with streams for the input and output files. Note: If you use this method then calling `setRemovePackFile(boolean)` will have no effect.
      Parameters:
        `inputStream` - TODO
        `outputStream` - TODO
      Throws:
        `IOException` - TODO

  - ### Method Detail

    - #### unpack

          public void unpack()
                      throws Pack200Exception,
                             IOException

      Unpacks the Archive from the input file to the output file
      Throws:
        `Pack200Exception` - TODO
        `IOException` - TODO

    - #### 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)

    - #### setQuiet

          public void setQuiet(boolean quiet)

    - #### setLogFile

          public void setLogFile(String logFileName)
                          throws FileNotFoundException

      Throws:
        `FileNotFoundException`

    - #### setLogFile

          public void setLogFile(String logFileName,
                                 boolean append)
                          throws FileNotFoundException

      Throws:
        `FileNotFoundException`

    - #### setDeflateHint

          public void setDeflateHint(boolean deflateHint)

Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.