public class BitBuffer extends Object
| Constructor and Description |
|---|
BitBuffer(byte[] b) |
| Modifier and Type | Method and Description |
|---|---|
long[] |
getArray()
flush the temporary field to the array and return the backing array
|
int |
getSize()
get the size of the backing array containing data
|
int |
read(int numBits) |
long |
readLong(int numBits) |
void |
rewind() |
byte[] |
toByteArray()
flush the temporary field to the backing array and return a byte[] copy of the backing long array
|
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 allocated buffer, they will be stored in the temporary field.
|
public void write(int x,
int numBits)
x - numBits - public long readLong(int numBits)
public int read(int numBits)
public long[] getArray()
public int getSize()
public void rewind()
public byte[] toByteArray()
Copyright © 2018 Space Applications Services. All rights reserved.