Class BitBuffer
java.lang.Object
nom.tam.fits.compression.algorithm.rice.BitBuffer
A bit wise reader writer around a bytebuffer.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intprivate static final intprivate static final intprivate final ByteBufferprivate static final intprivate static final intprivate static final intprivate static final intprivate static final intprivate static final longprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint(package private) voidclose()intvoidmovePosition(int i) voidputByte(byte byteToAdd) voidputByte(byte byteToAdd, int bits) voidputInt(int i) write out int value to the next 4 bytes of the buffervoidputInt(int i, int bits) voidputLong(long l, int bits)
-
Field Details
-
BITS_OF_4_BYTES
private static final int BITS_OF_4_BYTES- See Also:
-
BYTE_MASK
private static final int BYTE_MASK- See Also:
-
INTEGER_MASK
private static final long INTEGER_MASK- See Also:
-
BITS_OF_1_BYTE
private static final int BITS_OF_1_BYTE- See Also:
-
BITS_OF_2_BYTES
private static final int BITS_OF_2_BYTES- See Also:
-
BITS_OF_3_BYTES
private static final int BITS_OF_3_BYTES- See Also:
-
BYTE_1_OF_INT
private static final int BYTE_1_OF_INT- See Also:
-
BYTE_2_OF_INT
private static final int BYTE_2_OF_INT- See Also:
-
BYTE_3_OF_INT
private static final int BYTE_3_OF_INT- See Also:
-
BYTE_4_OF_INT
private static final int BYTE_4_OF_INT- See Also:
-
buffer
-
position
private long position
-
-
Constructor Details
-
BitBuffer
-
-
Method Details
-
bitbuffer
public int bitbuffer() -
close
void close() -
missingBitsInCurrentByte
public int missingBitsInCurrentByte() -
movePosition
public void movePosition(int i) -
putByte
public void putByte(byte byteToAdd) -
putByte
public void putByte(byte byteToAdd, int bits) -
putInt
public void putInt(int i) write out int value to the next 4 bytes of the buffer- Parameters:
i- integer to write
-
putInt
public void putInt(int i, int bits) -
putLong
public void putLong(long l, int bits)
-