Package htsjdk.samtools.cram.structure

# Class SliceBlocksReadStreams

java.lang.Object
htsjdk.samtools.cram.structure.SliceBlocksReadStreams

public class SliceBlocksReadStreams extends Object
Provides a layer over a `SliceBlocks` object and acts as a bridge between the DataSeries codecs and their underlying blocks when reading a CRAM stream by presenting a bit (core) or byte (external) stream for each block.

## Constructor Summary

Constructors
Constructor
Description
`SliceBlocksReadStreams(SliceBlocks sliceBlocks, CompressorCache compressorCache)`

## Method Summary

Modifier and Type
Method
Description
`BitInputStream`
`getCoreBlockInputStream()`
Get the `BitInputStream` for this `SliceBlocks` core block
`ByteArrayInputStream`
`getExternalInputStream(Integer contentID)`
Get the ByteArrayInputStream for the given contentID.

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

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

## Constructor Details

### SliceBlocksReadStreams

public SliceBlocksReadStreams(SliceBlocks sliceBlocks, CompressorCache compressorCache)

Parameters:
  `sliceBlocks` - `SliceBlocks` that have been populated from a CRAM stream

## Method Details

### getCoreBlockInputStream

public BitInputStream getCoreBlockInputStream()
Get the `BitInputStream` for this `SliceBlocks` core block

Returns:
  `BitInputStream` for the core block

### getExternalInputStream

public ByteArrayInputStream getExternalInputStream(Integer contentID)
Get the ByteArrayInputStream for the given contentID.

Parameters:
  `contentID` -
Returns:
  ByteArrayInputStream for contentID