|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Writer
org.apache.commons.io.output.NullWriter
public class NullWriter
This Writer writes all data to the famous /dev/null.
This Writer has no destination (file/socket etc.) and all
characters written to it are ignored and lost.
| Field Summary | |
|---|---|
static NullWriter |
NULL_WRITER
A singleton. |
| Fields inherited from class java.io.Writer |
|---|
lock |
| Constructor Summary | |
|---|---|
NullWriter()
Constructs a new NullWriter. |
|
| Method Summary | |
|---|---|
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(String str)
Does nothing - output to /dev/null. |
void |
write(String str,
int st,
int end)
Does nothing - output to /dev/null. |
| Methods inherited from class java.io.Writer |
|---|
append, append, append, append, append, append |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final NullWriter NULL_WRITER
| Constructor Detail |
|---|
public NullWriter()
| Method Detail |
|---|
public void write(int idx)
/dev/null.
write in class Writeridx - The character to writepublic void write(char[] chr)
/dev/null.
write in class Writerchr - The characters to write
public void write(char[] chr,
int st,
int end)
/dev/null.
write in class Writerchr - The characters to writest - The start offsetend - The number of characters to writepublic void write(String str)
/dev/null.
write in class Writerstr - The string to write
public void write(String str,
int st,
int end)
/dev/null.
write in class Writerstr - The string to writest - The start offsetend - The number of characters to writepublic void flush()
flush in interface Flushableflush in class WriterWriter.flush()public void close()
close in interface Closeableclose in class WriterWriter.close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||