Package htsjdk.samtools.cram.structure
Class SliceBlocksWriteStreams
- java.lang.Object
-
- htsjdk.samtools.cram.structure.SliceBlocksWriteStreams
-
public class SliceBlocksWriteStreams extends Object
Provides a layer over aSliceBlocks
object and acts as a bridge between the DataSeries codecs and their underlying blocks when writing a CRAM stream by presenting a bit (core) or byte (external) stream for each block.
-
-
Constructor Summary
Constructors Constructor Description SliceBlocksWriteStreams(CompressionHeader compressionHeader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SliceBlocks
flushStreamsToBlocks()
Compress and write each each stream to a corresponding Block (note that this does not write the blocks themselves to a container output stream - that can't happen until the slice is aggregated into a container.BitOutputStream
getCoreOutputStream()
ByteArrayOutputStream
getExternalOutputStream(Integer contentID)
Get the ByteArrayOutputStream corresponding to the requested contentID
-
-
-
Constructor Detail
-
SliceBlocksWriteStreams
public SliceBlocksWriteStreams(CompressionHeader compressionHeader)
- Parameters:
compressionHeader
-CompressionHeader
for the container containing the slice
-
-
Method Detail
-
getCoreOutputStream
public BitOutputStream getCoreOutputStream()
- Returns:
- the
BitOutputStream
for the core block
-
getExternalOutputStream
public ByteArrayOutputStream getExternalOutputStream(Integer contentID)
Get the ByteArrayOutputStream corresponding to the requested contentID- Parameters:
contentID
- ID of content being requested- Returns:
- ByteArrayOutputStream for contentID
-
flushStreamsToBlocks
public SliceBlocks flushStreamsToBlocks()
Compress and write each each stream to a corresponding Block (note that this does not write the blocks themselves to a container output stream - that can't happen until the slice is aggregated into a container.
-
-