T - the (source) data eries value type for this encoding. There is no way to express the type constraint
on this type using Java type bounds, since the legitimate values are drawn from a set of Java types
that correspond to the allowable types defined by DataSeriesType, but logically it must be a
type that corresponds to one of the DataSeriesType "types", i.e., it must one of be Byte,
Integer, Long or byte[].public abstract class CRAMEncoding<T>
extends java.lang.Object
EncodingDescriptor, which only describes an encoding, and the various CRAMCodec classes,
which can be used to read and write typed values to a stream. Has methods to serialize/deserialize
its parameters to/from a byte array and a method to construct a read or write CRAMCodec instance.| Modifier | Constructor and Description |
|---|---|
protected |
CRAMEncoding(EncodingID encodingId)
Create a new encoding.
|
| Modifier and Type | Method and Description |
|---|---|
abstract CRAMCodec<T> |
buildCodec(SliceBlocksReadStreams sliceBlocksReadStreams,
SliceBlocksWriteStreams sliceBlocksWriteStreams)
Instantiate the codec represented by this encoding by supplying it with the appropriate streams
|
CRAMCodec<T> |
buildReadCodec(SliceBlocksReadStreams sliceBlocksReadStreams)
Convenience initializer method for read codecs
|
CRAMCodec<T> |
buildWriteCodec(SliceBlocksWriteStreams sliceBlocksWriteStreams)
Convenience initializer method for write codecs
|
EncodingID |
id() |
EncodingDescriptor |
toEncodingDescriptor() |
abstract byte[] |
toSerializedEncodingParams()
Serialize encoding parameters to an ITF8-encoded byte array.
|
protected CRAMEncoding(EncodingID encodingId)
encodingId - the EncodingID associated with the concrete implementationpublic EncodingID id()
public EncodingDescriptor toEncodingDescriptor()
public abstract byte[] toSerializedEncodingParams()
public abstract CRAMCodec<T> buildCodec(SliceBlocksReadStreams sliceBlocksReadStreams, SliceBlocksWriteStreams sliceBlocksWriteStreams)
public CRAMCodec<T> buildReadCodec(SliceBlocksReadStreams sliceBlocksReadStreams)
sliceBlocksReadStreams - the core block bit stream a CoreCodec will read frompublic CRAMCodec<T> buildWriteCodec(SliceBlocksWriteStreams sliceBlocksWriteStreams)
sliceBlocksWriteStreams - the core block bit stream a CoreCodec will write to