# Class CRC32InputStream

java.lang.Object
java.io.InputStream
htsjdk.samtools.cram.io.CRC32InputStream

All Implemented Interfaces:
  `Closeable, AutoCloseable`

public class CRC32InputStream extends InputStream
An input stream that calculates CRC32 of all the bytes passed through it. The java `CRC32` class is used to internally.

## Constructor Summary

Constructors
Constructor
Description
`CRC32InputStream(InputStream delegate)`

## Method Summary

Modifier and Type
Method
Description
`int`
`available()`
`void`
`close()`
`int`
`getCRC32()`
`void`
`mark(int readLimit)`
`boolean`
`markSupported()`
`int`
`read()`
`int`
`read(byte[] b)`
`int`
`read(byte[] b, int off, int length)`
`void`
`reset()`
`long`
`skip(long n)`

### Methods inherited from class InputStream

`nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo`

### Methods inherited from class Object

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

## Constructor Details

### CRC32InputStream

public CRC32InputStream(InputStream delegate)

## Method Details

### getCRC32

public int getCRC32()

### read

public int read()

Specified by:
  `read` in class `InputStream`

### read

public int read(byte[] b)

Overrides:
  `read` in class `InputStream`

### read

public int read(byte[] b, int off, int length)

Overrides:
  `read` in class `InputStream`

### skip

public long skip(long n)

Overrides:
  `skip` in class `InputStream`

### available

public int available()

Overrides:
  `available` in class `InputStream`

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `Closeable`
Overrides:
  `close` in class `InputStream`

### mark

public void mark(int readLimit)

Overrides:
  `mark` in class `InputStream`

### reset

public void reset()

Overrides:
  `reset` in class `InputStream`

### markSupported

public boolean markSupported()

Overrides:
  `markSupported` in class `InputStream`