|
com.Ostermiller.util Java Utilities |
|||||||
| 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(String str)
Write a string. |
void |
write(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 IOException
close in interface Closeableclose in class WriterIOException - never.
public void flush()
throws IOException
flush in interface Flushableflush in class WriterIOException - if the stream is closed.
public void write(char[] cbuf)
throws IOException
write in class 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.
IOException - if the stream is closed, or the write is interrupted.
public void write(char[] cbuf,
int off,
int len)
throws IOException
write in class 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.
IOException - if the stream is closed, or the write is interrupted.
public void write(int c)
throws IOException
write in class Writerc - number of characters to be written
BufferOverflowException - if buffer does not allow blocking writes
and the buffer is full.
IOException - if the stream is closed, or the write is interrupted.
public void write(String str)
throws IOException
write in class 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.
IOException - if the stream is closed, or the write is interrupted.
public void write(String str,
int off,
int len)
throws IOException
write in class 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.
IOException - if the stream is closed, or the write is interrupted.
|
com.Ostermiller.util Java Utilities |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Copyright (c) 2001-2007 by Stephen Ostermiller