public class BitOutputStream extends Object implements AutoCloseable
| Constructor and Description |
|---|
BitOutputStream(OutputStream inner) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
int |
getTotalBitsWritten() |
static Bits |
toBits(java.util.function.Consumer<BitOutputStream> fn) |
void |
write(Bits bits) |
void |
write(boolean b) |
void |
write(char value) |
void |
write(double value) |
<T extends Enum<T>> |
write(Enum<T> value) |
void |
write(int value) |
void |
write(short value) |
Bits |
writeBoundedLong(long value,
long max) |
void |
writeVarLong(long value) |
void |
writeVarShort(short value) |
void |
writeVarShort(short value,
int optimal) |
public BitOutputStream(OutputStream inner)
public static Bits toBits(java.util.function.Consumer<BitOutputStream> fn)
public int getTotalBitsWritten()
public void flush()
throws IOException
IOExceptionpublic void write(Bits bits) throws IOException
IOExceptionpublic void write(boolean b)
throws IOException
IOExceptionpublic void write(double value)
throws IOException
IOExceptionpublic <T extends Enum<T>> void write(Enum<T> value) throws IOException
IOExceptionpublic void write(short value)
throws IOException
IOExceptionpublic void write(char value)
throws IOException
IOExceptionpublic void write(int value)
throws IOException
IOExceptionpublic Bits writeBoundedLong(long value, long max) throws IOException
IOExceptionpublic void writeVarLong(long value)
throws IOException
IOExceptionpublic void writeVarShort(short value)
throws IOException
IOExceptionpublic void writeVarShort(short value,
int optimal)
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOExceptionCopyright © 2019 SimiaCryptus Software. All rights reserved.