public class NullWriter
extends java.io.Writer
This Writer has no destination (file/socket etc.) and all characters written to it are ignored and lost.
| Modifier and Type | Field and Description |
|---|---|
static NullWriter |
INSTANCE
The singleton instance.
|
static NullWriter |
NULL_WRITER
Deprecated.
Use
INSTANCE. |
| Constructor and Description |
|---|
NullWriter()
Deprecated.
Use
INSTANCE. |
| Modifier and Type | Method and Description |
|---|---|
java.io.Writer |
append(char c)
Does nothing - output to
/dev/null. |
java.io.Writer |
append(java.lang.CharSequence csq)
Does nothing - output to
/dev/null. |
java.io.Writer |
append(java.lang.CharSequence csq,
int start,
int end)
Does nothing - output to
/dev/null. |
void |
close() |
void |
flush() |
void |
write(char[] chr)
Does nothing - output to
/dev/null. |
void |
write(char[] chr,
int st,
int end)
Does nothing - output to
/dev/null. |
void |
write(int idx)
Does nothing - output to
/dev/null. |
void |
write(java.lang.String str)
Does nothing - output to
/dev/null. |
void |
write(java.lang.String str,
int st,
int end)
Does nothing - output to
/dev/null. |
public static final NullWriter INSTANCE
@Deprecated public static final NullWriter NULL_WRITER
INSTANCE.@Deprecated public NullWriter()
INSTANCE.public java.io.Writer append(char c)
/dev/null.append in interface java.lang.Appendableappend in class java.io.Writerc - The character to writepublic java.io.Writer append(java.lang.CharSequence csq)
/dev/null.append in interface java.lang.Appendableappend in class java.io.Writercsq - The character sequence to writepublic java.io.Writer append(java.lang.CharSequence csq,
int start,
int end)
/dev/null.append in interface java.lang.Appendableappend in class java.io.Writercsq - The character sequence to writestart - The index of the first character to writeend - The index of the first character to write (exclusive)public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.WriterWriter.close()public void flush()
flush in interface java.io.Flushableflush in class java.io.WriterWriter.flush()public void write(char[] chr)
/dev/null.write in class java.io.Writerchr - The characters to writepublic void write(char[] chr,
int st,
int end)
/dev/null.write in class java.io.Writerchr - The characters to writest - The start offsetend - The number of characters to writepublic void write(int idx)
/dev/null.write in class java.io.Writeridx - The character to writepublic void write(java.lang.String str)
/dev/null.write in class java.io.Writerstr - The string to writepublic void write(java.lang.String str,
int st,
int end)
/dev/null.write in class java.io.Writerstr - The string to writest - The start offsetend - The number of characters to writeCopyright © 2010 - 2023 Adobe. All Rights Reserved