BitBuffer.SimpleBitBuffer| Modifier | Constructor and Description |
|---|---|
protected |
SimpleBitBuffer(byte[] bytes) |
protected |
SimpleBitBuffer(int bits) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
asByteArray()
This method returns representation of this bufer as
array of bytes. nota that not-full bits will be set to 0.
|
boolean |
canRead() |
boolean |
canWrite() |
void |
flip()
Toggles the buffer betwen read/write modes.
|
boolean |
getBoolean() |
byte |
getByte() |
byte |
getByte(int bits) |
int |
limit() |
int |
position() |
BitBuffer |
putBoolean(boolean b)
Puts boolean value(Single bit)
|
BitBuffer |
putByte(byte b)
Puts byte value(8 bits)
|
BitBuffer |
putByte(byte b,
int bits)
Puts byte value with specified bit count.
|
BitBuffer |
setPosition(int newPosition)
Sets cursor position for this buffer
|
int |
size() |
protected SimpleBitBuffer(int bits)
protected SimpleBitBuffer(byte[] bytes)
public BitBuffer putBoolean(boolean b)
BitBufferputBoolean in class BitBufferb - value to setpublic BitBuffer putByte(byte b)
BitBufferpublic BitBuffer putByte(byte b, int bits)
BitBufferpublic boolean getBoolean()
getBoolean in class BitBufferpublic byte getByte(int bits)
public void flip()
BitBufferpublic boolean canRead()
public boolean canWrite()
public int limit()
public int position()
public BitBuffer setPosition(int newPosition)
BitBuffersetPosition in class BitBufferpublic byte[] asByteArray()
BitBufferasByteArray in class BitBuffer