Package org.apache.commons.compress.utils

# Class CRC32VerifyingInputStream

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.commons.compress.utils.ChecksumVerifyingInputStream
org.apache.commons.compress.utils.CRC32VerifyingInputStream

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

public class CRC32VerifyingInputStream extends ChecksumVerifyingInputStream
A stream that verifies the CRC of the data read once the stream is exhausted.

Since:
  1.6
This class is not thread-safe

- ## Field Summary

  ### Fields inherited from class java.io.FilterInputStream

  `in`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CRC32VerifyingInputStream(InputStream in, long size, int expectedCrc32)`
  Constructs a new instance.
  `CRC32VerifyingInputStream(InputStream in, long size, long expectedCrc32)`
  Constructs a new instance.

- ## Method Summary

  ### Methods inherited from class org.apache.commons.compress.utils.ChecksumVerifyingInputStream

  `getBytesRemaining, read, read, skip`

  ### Methods inherited from class java.io.FilterInputStream

  `available, close, mark, markSupported, read, reset`

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

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

- ## Constructor Details

  - ### CRC32VerifyingInputStream

    public CRC32VerifyingInputStream(InputStream in, long size, int expectedCrc32)
    Constructs a new instance.
    Parameters:
      `in` - the stream to wrap
      `size` - the of the stream's content
      `expectedCrc32` - the expected checksum

  - ### CRC32VerifyingInputStream

    public CRC32VerifyingInputStream(InputStream in, long size, long expectedCrc32)
    Constructs a new instance.
    Parameters:
      `in` - the stream to wrap
      `size` - the of the stream's content
      `expectedCrc32` - the expected checksum
    Since:
      1.7