Class XZCompressorInputStream

java.lang.Object
java.io.InputStream
org.apache.commons.compress.compressors.CompressorInputStream
org.apache.commons.compress.compressors.xz.XZCompressorInputStream
All Implemented Interfaces:
Closeable, AutoCloseable, InputStreamStatistics

XZ decompressor.
Since:
1.4
  • Constructor Details

    • XZCompressorInputStream

      public XZCompressorInputStream(InputStream inputStream) throws IOException
      Creates a new input stream that decompresses XZ-compressed data from the specified input stream. This doesn't support concatenated .xz files.
      Parameters:
      inputStream - where to read the compressed data
      Throws:
      IOException - if the input is not in the .xz format, the input is corrupt or truncated, the .xz headers specify options that are not supported by this implementation, or the underlying inputStream throws an exception
    • XZCompressorInputStream

      public XZCompressorInputStream(InputStream inputStream, boolean decompressConcatenated) throws IOException
      Creates a new input stream that decompresses XZ-compressed data from the specified input stream.
      Parameters:
      inputStream - where to read the compressed data
      decompressConcatenated - if true, decompress until the end of the input; if false, stop after the first .xz stream and leave the input position to point to the next byte after the .xz stream
      Throws:
      IOException - if the input is not in the .xz format, the input is corrupt or truncated, the .xz headers specify options that are not supported by this implementation, or the underlying inputStream throws an exception
    • XZCompressorInputStream

      public XZCompressorInputStream(InputStream inputStream, boolean decompressConcatenated, int memoryLimitInKb) throws IOException
      Creates a new input stream that decompresses XZ-compressed data from the specified input stream.
      Parameters:
      inputStream - where to read the compressed data
      decompressConcatenated - if true, decompress until the end of the input; if false, stop after the first .xz stream and leave the input position to point to the next byte after the .xz stream
      memoryLimitInKb - memory limit used when reading blocks. If the estimated memory limit is exceeded on read(), a MemoryLimitException is thrown.
      Throws:
      IOException - if the input is not in the .xz format, the input is corrupt or truncated, the .xz headers specify options that are not supported by this implementation, or the underlying inputStream throws an exception
      Since:
      1.14
  • Method Details