class AppendableWriter
extends java.io.Writer
Appendable target. If the target is Flushable
or Closeable, flush()es and close()s will also be delegated to the target.| Modifier and Type | Field and Description |
|---|---|
private boolean |
closed |
private java.lang.Appendable |
target |
| Constructor and Description |
|---|
AppendableWriter(java.lang.Appendable target)
Creates a new writer that appends everything it writes to
target. |
| Modifier and Type | Method and Description |
|---|---|
java.io.Writer |
append(char c) |
java.io.Writer |
append(java.lang.CharSequence charSeq) |
java.io.Writer |
append(java.lang.CharSequence charSeq,
int start,
int end) |
private void |
checkNotClosed() |
void |
close() |
void |
flush() |
void |
write(char[] cbuf,
int off,
int len) |
void |
write(int c) |
void |
write(java.lang.String str) |
void |
write(java.lang.String str,
int off,
int len) |
AppendableWriter(java.lang.Appendable target)
target.target - target to which to append outputpublic void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void write(int c)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void write(java.lang.String str)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void write(java.lang.String str,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.Writerjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Writerjava.io.IOExceptionpublic java.io.Writer append(char c)
throws java.io.IOException
append in interface java.lang.Appendableappend in class java.io.Writerjava.io.IOExceptionpublic java.io.Writer append(@CheckForNull
java.lang.CharSequence charSeq)
throws java.io.IOException
append in interface java.lang.Appendableappend in class java.io.Writerjava.io.IOExceptionpublic java.io.Writer append(@CheckForNull
java.lang.CharSequence charSeq,
int start,
int end)
throws java.io.IOException
append in interface java.lang.Appendableappend in class java.io.Writerjava.io.IOExceptionprivate void checkNotClosed()
throws java.io.IOException
java.io.IOException