public interface BitOutputStream
extends java.io.Closeable, java.io.Flushable
OutputStream
concept and provide flush/close functionality accordingly.Modifier and Type | Method and Description |
---|---|
void |
write(boolean bit)
Write a single bit specified in the boolean argument.
|
void |
write(boolean bit,
long repeat)
Write a single bit specified in the boolean argument repeatedly.
|
void |
write(byte bitContainer,
int nofBits)
Write specified number of bits supplied in the byte value.
|
void |
write(int bitContainer,
int nofBits)
Write specified number of bits supplied in the integer value.
|
void |
write(long bitContainer,
int nofBits)
Write specified number of bits supplied in the long value.
|
void write(int bitContainer, int nofBits) throws java.io.IOException
bitContainer
- an integer containing the bits to be written outnofBits
- the number of bits to written out, minimum 0, maximum 32.java.io.IOException
- as per streaming contract in java.void write(long bitContainer, int nofBits) throws java.io.IOException
bitContainer
- an integer containing the bits to be written outnofBits
- the number of bits to written out, minimum 0, maximum 64.java.io.IOException
- as per streaming contract in java.void write(byte bitContainer, int nofBits) throws java.io.IOException
bitContainer
- an integer containing the bits to be written outnofBits
- the number of bits to written out, minimum 0, maximum 8.java.io.IOException
- as per streaming contract in java.void write(boolean bit) throws java.io.IOException
bit
- emit 1 if true, 0 otherwise.java.io.IOException
- as per streaming contract in java.void write(boolean bit, long repeat) throws java.io.IOException
bit
- emit 1 if true, 0 otherwise.repeat
- the number of bits to emit.java.io.IOException
- as per streaming contract in java.