protected class CircularCharBuffer.CircularCharBufferWriter
extends java.io.Writer
Modifier | Constructor and Description |
---|---|
protected |
CircularCharBufferWriter() |
Modifier and Type | Method and Description |
---|---|
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.
|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.Writer
java.io.IOException
- never.public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.Writer
java.io.IOException
- if the stream is closed.public void write(char[] cbuf) throws java.io.IOException
write
in class java.io.Writer
cbuf
- Array of characters to be writtenBufferOverflowException
- 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.Writer
cbuf
- Array of charactersoff
- Offset from which to start writing characterslen
- - Number of characters to writeBufferOverflowException
- 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.Writer
c
- number of characters to be writtenBufferOverflowException
- 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.Writer
str
- String to be writtenBufferOverflowException
- 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.Writer
str
- A Stringoff
- Offset from which to start writing characterslen
- Number of characters to writeBufferOverflowException
- 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.Copyright (c) 2001-2020 by Stephen Ostermiller