public class BetaIntegerCodec extends CoreCodec<java.lang.Integer>
coreBlockInputStream, coreBlockOutputStream| Constructor and Description |
|---|
BetaIntegerCodec(BitInputStream coreBlockInputStream,
BitOutputStream coreBlockOutputStream,
int offset,
int bitsPerValue)
Given integers to encode in the range MIN to MAX:
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
read()
Read a single object from the stream
|
java.lang.Integer |
read(int length)
Read a array of specified length from the stream
|
void |
write(java.lang.Integer value)
Write an object to the stream
|
public BetaIntegerCodec(BitInputStream coreBlockInputStream, BitOutputStream coreBlockOutputStream, int offset, int bitsPerValue)
offset - the common value to be added to all values before storage.
Setting this to (-MIN) will ensure all stored values will be in the range (0 .. MAX - MIN)bitsPerValue - the smallest value which will allow the largest stored value (MAX - MIN)public final java.lang.Integer read()
CRAMCodecpublic java.lang.Integer read(int length)
CRAMCodeclength - the number of elements to readpublic final void write(java.lang.Integer value)
CRAMCodecvalue - the object to write