org.apache.commons.io.output
Class NullWriter
java.lang.Object
java.io.Writer
org.apache.commons.io.output.NullWriter
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public class NullWriter
- extends Writer
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.
- Version:
- $Id: NullWriter.java 462832 2006-10-11 15:48:09Z scolebourne $
Constructor Summary |
NullWriter()
Constructs a new NullWriter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullWriter
public NullWriter()
- Constructs a new NullWriter.
write
public void write(int idx)
- Overrides:
write
in class Writer
- See Also:
Writer.write(int)
write
public void write(char[] chr)
- Overrides:
write
in class Writer
- See Also:
Writer.write(char[])
write
public void write(char[] chr,
int st,
int end)
- Specified by:
write
in class Writer
- See Also:
Writer.write(char[], int, int)
write
public void write(String str)
- Overrides:
write
in class Writer
- See Also:
Writer.write(String)
write
public void write(String str,
int st,
int end)
- Overrides:
write
in class Writer
- See Also:
Writer.write(String, int, int)
flush
public void flush()
- Specified by:
flush
in interface Flushable
- Specified by:
flush
in class Writer
- See Also:
Writer.flush()
close
public void close()
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Writer
- See Also:
Writer.close()