|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectloci.formats.codec.BitWriter
public class BitWriter
A class for writing arbitrary numbers of bits to a byte array.
| Constructor Summary | |
|---|---|
BitWriter()
Constructs a new bit writer. |
|
BitWriter(int size)
Constructs a new bit writer with the given initial buffer size. |
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
Tests the BitWriter class. |
byte[] |
toByteArray()
Gets an array containing all bits written thus far. |
void |
write(int value,
int numBits)
Writes the given value using the given number of bits. |
void |
write(String bitString)
Writes the bits represented by a bit string to the buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitWriter()
public BitWriter(int size)
| Method Detail |
|---|
public void write(int value,
int numBits)
public void write(String bitString)
public byte[] toByteArray()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||