|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectOutputStream
FilterOutputStream
BitOutputStream
public final class BitOutputStream
Providing ability to write decorate outputstream with a bit oriented interface.
| Field Summary |
|---|
| Fields inherited from class FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
BitOutputStream(OutputStream out)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class FilterOutputStream |
|---|
close |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BitOutputStream(OutputStream out)
| Method Detail |
|---|
public void write(byte b,
int nbits)
throws IOException
b - int which should be writtennbits - bit count to write
IOException - if an I/O error occurs
public void flush()
throws IOException
flush in interface Flushableflush in class FilterOutputStreamIOException - if I/O error occurs
public void write(boolean bit)
throws IOException
bit - boolean
IOException - 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||