Package htsjdk.samtools.cram.encoding
Class EncodingFactory
- java.lang.Object
-
- htsjdk.samtools.cram.encoding.EncodingFactory
-
public class EncodingFactory extends Object
A helper class to instantiate an appropriateCRAMEncoding
for a givenDataSeriesType
andCRAMEncoding
. Also useful to hide encoding implementations.
-
-
Constructor Summary
Constructors Constructor Description EncodingFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> CRAMEncoding<T>
createEncoding(DataSeriesType valueType, EncodingID id, byte[] params)
Create an encoding for the data series type and encoding id.
-
-
-
Method Detail
-
createEncoding
public static <T> CRAMEncoding<T> createEncoding(DataSeriesType valueType, EncodingID id, byte[] params)
Create an encoding for the data series type and encoding id.- Type Parameters:
T
- encoding object type, like Integer or String.- Parameters:
valueType
- data type of the values to be produced/consumed by the encodingid
- encoding id used for data serializationparams
- encoding initialization values- Returns:
- a new encoding with the requested parameters
-
-