Class ExternalByteArrayEncoding
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.CRAMEncoding<T>
-
- htsjdk.samtools.cram.encoding.external.ExternalEncoding<byte[]>
-
- htsjdk.samtools.cram.encoding.external.ExternalByteArrayEncoding
-
public final class ExternalByteArrayEncoding extends ExternalEncoding<byte[]>
-
-
Field Summary
-
Fields inherited from class htsjdk.samtools.cram.encoding.external.ExternalEncoding
externalBlockContentId
-
-
Constructor Summary
Constructors Constructor Description ExternalByteArrayEncoding(int externalBlockContentId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CRAMCodec<byte[]>
buildCodec(SliceBlocksReadStreams sliceBlocksReadStreams, SliceBlocksWriteStreams sliceBlocksWriteStreams)
Instantiate the codec represented by this encoding by supplying it with the appropriate streamsstatic ExternalByteArrayEncoding
fromSerializedEncodingParams(byte[] serializedParams)
Create a new instance of this encoding using the (ITF8 encoded) serializedParams.byte[]
toSerializedEncodingParams()
Serialize encoding parameters to an ITF8-encoded byte array.String
toString()
-
Methods inherited from class htsjdk.samtools.cram.encoding.CRAMEncoding
buildReadCodec, buildWriteCodec, id, toEncodingDescriptor
-
-
-
-
Method Detail
-
fromSerializedEncodingParams
public static ExternalByteArrayEncoding fromSerializedEncodingParams(byte[] serializedParams)
Create a new instance of this encoding using the (ITF8 encoded) serializedParams.- Parameters:
serializedParams
-- Returns:
- ExternalByteArrayEncoding with parameters populated from serializedParams
-
toSerializedEncodingParams
public byte[] toSerializedEncodingParams()
Description copied from class:CRAMEncoding
Serialize encoding parameters to an ITF8-encoded byte array. By convention, each subclass should have a corresponding and symmetric "fromSerializedEncodingParams" that returns a new instance of that encoding populated with values from the serialized encoding params.- Overrides:
toSerializedEncodingParams
in classExternalEncoding<byte[]>
- Returns:
- a byte array containing the encoding's parameter values encoded as an ITF8 stream.
-
buildCodec
public CRAMCodec<byte[]> buildCodec(SliceBlocksReadStreams sliceBlocksReadStreams, SliceBlocksWriteStreams sliceBlocksWriteStreams)
Description copied from class:CRAMEncoding
Instantiate the codec represented by this encoding by supplying it with the appropriate streams- Specified by:
buildCodec
in classCRAMEncoding<byte[]>
- Parameters:
sliceBlocksReadStreams
- the core block bit stream aCoreCodec
will read fromsliceBlocksWriteStreams
- the core block bit stream aCoreCodec
will write to- Returns:
- a newly instantiated codec
-
toString
public String toString()
- Overrides:
toString
in classExternalEncoding<byte[]>
-
-