Class ExternalBlock
- java.lang.Object
-
- htsjdk.samtools.cram.structure.block.Block
-
- htsjdk.samtools.cram.structure.block.ExternalBlock
-
public class ExternalBlock extends Block
A Block used by Slices to store data externally
-
-
Field Summary
-
Fields inherited from class htsjdk.samtools.cram.structure.block.Block
NO_CONTENT_ID
-
-
Constructor Summary
Constructors Constructor Description ExternalBlock(BlockCompressionMethod compressionMethod, int contentId, byte[] compressedContent, int uncompressedLength)
Create a new external data block with the given compression method, uncompressed content, and content ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getContentId()
Return the External Content ID for this block.-
Methods inherited from class htsjdk.samtools.cram.structure.block.Block
createRawCompressionHeaderBlock, createRawCoreDataBlock, createRawFileHeaderBlock, createRawSliceHeaderBlock, getCompressedContent, getCompressedContentSize, getCompressionMethod, getContentType, getUncompressedContent, getUncompressedContentSize, read, toString, write
-
-
-
-
Constructor Detail
-
ExternalBlock
public ExternalBlock(BlockCompressionMethod compressionMethod, int contentId, byte[] compressedContent, int uncompressedLength)
Create a new external data block with the given compression method, uncompressed content, and content ID. The block will have EXTERNAL content type.- Parameters:
compressionMethod
- the compression method used in this blockcontentId
- the external identifier for the blockcompressedContent
- the content of this block, in compressed modeuncompressedLength
- the length of the content stored in this block when uncompressed
-
-
Method Detail
-
getContentId
public final int getContentId()
Description copied from class:Block
Return the External Content ID for this block. Only ExternalBlocks have a meaningful Content ID, so that class overrides this method.- Overrides:
getContentId
in classBlock
- Returns:
- the External Content ID, or NO_CONTENT_ID
-
-