Package htsjdk.samtools.cram.io

# Class CRC32OutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
htsjdk.samtools.cram.io.CRC32OutputStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `AutoCloseable`

public class CRC32OutputStream extends FilterOutputStream
An output stream that calculates CRC32 checksum of all the bytes written through the stream. The java `CRC32` class is used to internally.

## Field Summary

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

`out`

## Constructor Summary

Constructors
Constructor
Description
`CRC32OutputStream(OutputStream out)`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`getCrc32_BigEndian()`
`byte[]`
`getCrc32_LittleEndian()`
`long`
`getLongCrc32()`
`void`
`write(byte[] b)`
`void`
`write(byte[] b, int off, int length)`
`void`
`write(int b)`

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

`close, flush`

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

`nullOutputStream`

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

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

## Constructor Details

### CRC32OutputStream

public CRC32OutputStream(OutputStream out)

## Method Details

### write

public void write(byte[] b, int off, int length)

Overrides:
  `write` in class `FilterOutputStream`

### write

public void write(int b)

Overrides:
  `write` in class `FilterOutputStream`

### write

public void write(byte[] b)

Overrides:
  `write` in class `FilterOutputStream`

### getLongCrc32

public long getLongCrc32()

### getCrc32_BigEndian

public byte[] getCrc32_BigEndian()

### getCrc32_LittleEndian

public byte[] getCrc32_LittleEndian()