public class Writer_Appendable
extends java.io.Writer
Appendable.append(char).
flush() flushes if the Writer_Appendable(Appendable, Flushable)
was created with a flush instances. This instances may/should be the same as the Appendable instance.
If a flush instance is not given, flush has no effect.
close() flushes and closes this instances. It closes the Flushable instance if it is Closeable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Appendable |
app |
private java.io.Flushable |
flush |
static java.lang.String |
sVersion
Version, history and license.
|
| Constructor and Description |
|---|
Writer_Appendable(java.lang.Appendable app)
Instance which does not support flush(), but flush() can be called
|
Writer_Appendable(java.lang.Appendable app,
java.io.Flushable flush)
Instance which supports a maybe specific flush
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
If the Appendable is also a CharSequence, such as StringBuilder, then return it.
|
void |
close() |
void |
flush() |
java.lang.CharSequence |
getContent()
If the Appendable is also a CharSequence, such as StringBuilder, then return it.
|
java.lang.String |
toString()
toString() should present the Appendable-content, if it is a StringBuilder, it's very proper.
|
void |
write(char[] cbuf,
int off,
int len) |
public static final java.lang.String sVersion
private java.lang.Appendable app
private final java.io.Flushable flush
public Writer_Appendable(java.lang.Appendable app)
app - public Writer_Appendable(java.lang.Appendable app,
java.io.Flushable flush)
app - Can be the same as flush, if it is a Writerflush - same as app or specific other.public void write(char[] cbuf,
int off,
int len)
throws java.io.IOException
write in class java.io.Writerjava.io.IOExceptionpublic java.lang.CharSequence getContent()
public void clear()
public 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.lang.String toString()
toString in class java.lang.Object