public class BitWriter extends Object
| Constructor and Description |
|---|
BitWriter(ByteBuffer bb)
Constructs a BitWriter around an existing ByteBuffer
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
flush the temporary long to the ByteBuffer
do not call this method twice!!
|
void |
write(int x,
int numBits)
write the least significant numBits of x into the BitBuffer
Note that there is no check that the bits will actually fit into the ByteBuffer, they will be stored in the temporary field.
|
public BitWriter(ByteBuffer bb)
bb - public void write(int x,
int numBits)
x - numBits - public void flush()
Copyright © 2017 Space Applications Services. All rights reserved.