org.apache.commons.compress.compressors.z

## Class ZCompressorInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.apache.commons.compress.compressors.CompressorInputStream
    - - org.apache.commons.compress.compressors.z._internal_.InternalLZWInputStream
      - - org.apache.commons.compress.compressors.z.ZCompressorInputStream

- All Implemented Interfaces:
    Closeable

      public class ZCompressorInputStream
      extends InternalLZWInputStream

  Input stream that decompresses .Z files.
  Since:
    1.7

- - ### Field Summary

    - ### Fields inherited from class org.apache.commons.compress.compressors.z._internal_.InternalLZWInputStream

      `bitsCached, bitsCachedSize, characters, clearCode, codeSize, in, prefixes, previousCode, tableSize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZCompressorInputStream(InputStream inputStream)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `addEntry(int previousCode, byte character)` Add a new entry to the dictionary.
    `protected int` | `decompressNextSymbol()` Read the next code and expand it.
    `protected int` | `readNextCode()` Reads the next code from the stream.

    - ### Methods inherited from class org.apache.commons.compress.compressors.z._internal_.InternalLZWInputStream

      `addEntry, addRepeatOfPreviousCode, close, expandCodeToOutputStack, initializeTables, read, read, setClearCode`

    - ### Methods inherited from class org.apache.commons.compress.compressors.CompressorInputStream

      `count, count, getBytesRead, getCount, pushedBackBytes`

    - ### Methods inherited from class java.io.InputStream

      `available, mark, markSupported, read, reset, skip`

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

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

- - ### Constructor Detail

    - #### ZCompressorInputStream

          public ZCompressorInputStream(InputStream inputStream)
                                 throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### readNextCode

          protected int readNextCode()
                              throws IOException

      Reads the next code from the stream.

      This method is only protected for technical reasons and is not part of Commons Compress' published API. It may change or disappear without warning.

      Overrides:
        `readNextCode` in class `InternalLZWInputStream`
      Throws:
        `IOException`

    - #### addEntry

          protected int addEntry(int previousCode,
                     byte character)
                          throws IOException

      Add a new entry to the dictionary.

      This method is only protected for technical reasons and is not part of Commons Compress' published API. It may change or disappear without warning.

      Specified by:
        `addEntry` in class `InternalLZWInputStream`
      Throws:
        `IOException`

    - #### decompressNextSymbol

          protected int decompressNextSymbol()
                                      throws IOException

      Read the next code and expand it.

      This method is only protected for technical reasons and is not part of Commons Compress' published API. It may change or disappear without warning.

      Specified by:
        `decompressNextSymbol` in class `InternalLZWInputStream`
      Throws:
        `IOException`

Copyright © 2014 The Apache Software Foundation. All rights reserved.