Package htsjdk.samtools.cram.encoding
Class ByteArrayLenEncoding
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.CRAMEncoding<byte[]>
-
- htsjdk.samtools.cram.encoding.ByteArrayLenEncoding
-
public class ByteArrayLenEncoding extends CRAMEncoding<byte[]>
-
-
Constructor Summary
Constructors Constructor Description ByteArrayLenEncoding(CRAMEncoding<Integer> lenEncoding, CRAMEncoding<byte[]> byteEncoding)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CRAMCodec<byte[]>buildCodec(BitInputStream coreBlockInputStream, BitOutputStream coreBlockOutputStream, Map<Integer,ByteArrayInputStream> externalBlockInputMap, Map<Integer,ByteArrayOutputStream> externalBlockOutputMap)Instantiate the codec represented by this encoding by supplying it with the appropriate streamsstatic ByteArrayLenEncodingfromParams(byte[] data)byte[]toByteArray()Subclasses but have a defined serialization of their parameters-
Methods inherited from class htsjdk.samtools.cram.encoding.CRAMEncoding
buildReadCodec, buildWriteCodec, id, toParam
-
-
-
-
Constructor Detail
-
ByteArrayLenEncoding
public ByteArrayLenEncoding(CRAMEncoding<Integer> lenEncoding, CRAMEncoding<byte[]> byteEncoding)
-
-
Method Detail
-
fromParams
public static ByteArrayLenEncoding fromParams(byte[] data)
-
toByteArray
public byte[] toByteArray()
Description copied from class:CRAMEncodingSubclasses but have a defined serialization of their parameters- Specified by:
toByteArrayin classCRAMEncoding<byte[]>- Returns:
- a byte array representing a specific encoding's parameter values
-
buildCodec
public CRAMCodec<byte[]> buildCodec(BitInputStream coreBlockInputStream, BitOutputStream coreBlockOutputStream, Map<Integer,ByteArrayInputStream> externalBlockInputMap, Map<Integer,ByteArrayOutputStream> externalBlockOutputMap)
Description copied from class:CRAMEncodingInstantiate the codec represented by this encoding by supplying it with the appropriate streams- Specified by:
buildCodecin classCRAMEncoding<byte[]>- Parameters:
coreBlockInputStream- the core block bit stream aCoreCodecwill read fromcoreBlockOutputStream- the core block bit stream aCoreCodecwill write toexternalBlockInputMap- the external block byte stream aExternalCodecwill read fromexternalBlockOutputMap- the external block byte stream aExternalCodecwill write to- Returns:
- a newly instantiated codec
-
-