public final class BitOutputStream extends FilterOutputStream
out| Constructor and Description |
|---|
BitOutputStream(OutputStream out) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
writes bits from buffer to output stream
|
void |
write(boolean bit)
Write a bit to this bit oriented stream.
|
void |
write(byte[] b)
Writes
b.length bytes to this output stream. |
void |
write(byte[] b,
int off,
int len)
Writes
len bytes from the specified byte array
starting at offset off to this output stream. |
void |
write(byte b,
int nbits)
Writes some bits (max 8) from the specified byte to stream.
|
void |
write(int b)
Writes the specified
byte to this bit-wise output stream. |
void |
write(int bitVect,
int length)
Write an integer as a bit vector of the specified length.
|
closepublic BitOutputStream(OutputStream out)
public void write(byte b,
int nbits)
throws IOException
b - int which should be writtennbits - bit count to writeIOException - if an I/O error occurspublic void flush()
throws IOException
flush in interface Flushableflush in class FilterOutputStreamIOException - if I/O error occurspublic void write(boolean bit)
throws IOException
bit - booleanIOException - DOCUMENT ME!public void write(int bitVect,
int length)
throws IOException
bitVect - intlength - DOCUMENT ME!IOException - DOCUMENT ME!public void write(int b)
throws IOException
byte to this bit-wise output stream.
The write method of BitOutputStream does nto
always cals the write method of its underlying output
stream.
Implements the abstract write method of OutputStream.
write in class FilterOutputStreamb - the byte.IOException - if an I/O error occurs.public void write(byte[] b)
throws IOException
b.length bytes to this output stream.
The write method of FilterOutputStream calls
its write method of one argument with the argument
b.
Note that this method does not call the one-argument write
method of its underlying stream with the single argument
b.
write in class FilterOutputStreamb - the data to be written.IOException - if an I/O error occurs.FilterOutputStream.write(byte[], int, int)public void write(byte[] b,
int off,
int len)
throws IOException
len bytes from the specified byte array
starting at offset off to this output stream.
The write method of FilterOutputStream calls
the write method of one argument on each byte
to output.
Note that this method does not call the write method of its
underlying input stream with the same arguments.
write in class FilterOutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.IOException - if an I/O error occurs.FilterOutputStream.write(int)Copyright © 2006–2019 GeoSolutions. All rights reserved.