[]
public class BitOutputBuffer
Name | Description |
---|---|
BitOutputBuffer() | Creates a new BitOutputBuffer width a buffer of length 'SZ_INIT'. |
Name | Description |
---|---|
SZ_INCR | The increment size for the buffer, 16 bytes. This is the number of bytes that are added to the buffer each time it is needed to enlarge it. |
SZ_INIT | The initial size for the buffer, 32 bytes. |
Name | Description |
---|---|
Buffer | |
Length |
Name | Description |
---|---|
ToString() | Prints information about this object for debugging purposes |
reset() | Resets the buffer. This rewinds the current position to the start of the buffer and sets all tha data to 0. Note that no new buffer is allocated, so this will affect any data that was returned by the 'getBuffer()' method. |
toByteArray(byte[]) | Returns the byte buffer data in a new array. This is a copy of the internal byte buffer. If 'data' is non-null it is used to return the data. This array should be large enough to contain all the data, otherwise a IndexOutOfBoundsException is thrown by the Java system. The number of elements returned is what 'getLength()' returns. |
writeBit(int) | |
writeBits(int, int) |