|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
com.Ostermiller.util.CircularByteBuffer.CircularByteBufferOutputStream
protected class CircularByteBuffer.CircularByteBufferOutputStream
Class for writing to a circular byte buffer. If the buffer is full, the writes will either block until there is some space available or throw an IOException based on the CircularByteBuffer's preference.
| Constructor Summary | |
|---|---|
protected |
CircularByteBuffer.CircularByteBufferOutputStream()
|
| Method Summary | |
|---|---|
void |
close()
Close the stream, flushing it first. |
void |
flush()
Flush the stream. |
void |
write(byte[] cbuf)
Write an array of bytes. |
void |
write(byte[] cbuf,
int off,
int len)
Write a portion of an array of bytes. |
void |
write(int c)
Write a single byte. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CircularByteBuffer.CircularByteBufferOutputStream()
| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOException - never.
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException - if the stream is closed.
public void write(byte[] cbuf)
throws java.io.IOException
write in class java.io.OutputStreamcbuf - Array of bytes to be written
BufferOverflowException - if buffer does not allow blocking writes
and the buffer is full. If the exception is thrown, no data
will have been written since the buffer was set to be non-blocking.
java.io.IOException - if the stream is closed, or the write is interrupted.
public void write(byte[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamcbuf - Array of bytesoff - Offset from which to start writing byteslen - - Number of bytes to write
BufferOverflowException - if buffer does not allow blocking writes
and the buffer is full. If the exception is thrown, no data
will have been written since the buffer was set to be non-blocking.
java.io.IOException - if the stream is closed, or the write is interrupted.
public void write(int c)
throws java.io.IOException
write in class java.io.OutputStreamc - number of bytes to be written
BufferOverflowException - if buffer does not allow blocking writes
and the buffer is full.
java.io.IOException - if the stream is closed, or the write is interrupted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||