|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
com.Ostermiller.util.CircularCharBuffer.CircularCharBufferWriter
protected class CircularCharBuffer.CircularCharBufferWriter
Class for writing to a circular character buffer. If the buffer is full, the writes will either block until there is some space available or throw an IOException based on the CircularCharBuffer's preference.
| Field Summary |
|---|
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
protected |
CircularCharBuffer.CircularCharBufferWriter()
|
| Method Summary | |
|---|---|
void |
close()
Close the stream, flushing it first. |
void |
flush()
Flush the stream. |
void |
write(char[] cbuf)
Write an array of characters. |
void |
write(char[] cbuf,
int off,
int len)
Write a portion of an array of characters. |
void |
write(int c)
Write a single character. |
void |
write(java.lang.String str)
Write a string. |
void |
write(java.lang.String str,
int off,
int len)
Write a portion of a string. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CircularCharBuffer.CircularCharBufferWriter()
| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.Writerjava.io.IOException - never.
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOException - if the stream is closed.
public void write(char[] cbuf)
throws java.io.IOException
write in class java.io.Writercbuf - Array of characters 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(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writercbuf - Array of charactersoff - Offset from which to start writing characterslen - - Number of characters 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.Writerc - number of characters 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.
public void write(java.lang.String str)
throws java.io.IOException
write in class java.io.Writerstr - String 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(java.lang.String str,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerstr - A Stringoff - Offset from which to start writing characterslen - Number of characters 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||