- java.lang.Object
-
- java.io.Writer
-
- com.aoapps.lang.io.NullWriter
-
- All Implemented Interfaces:
NoClose,Closeable,Flushable,Appendable,AutoCloseable
public final class NullWriter extends Writer implements NoClose
Discards all data.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NullWriterappend(char c)NullWriterappend(CharSequence csq)NullWriterappend(CharSequence csq, int start, int end)voidclose()Calls to close are ignored whenNoClose.isNoClose(), otherwise some action might be taken which means close calls to this object may not be skipped or assumed to be ignored.voidflush()static NullWritergetInstance()voidwrite(char[] cbuf)voidwrite(char[] cbuf, int off, int len)voidwrite(int c)voidwrite(String str)voidwrite(String str, int off, int len)-
Methods inherited from class java.io.Writer
nullWriter
-
-
-
-
Method Detail
-
getInstance
public static NullWriter getInstance()
-
append
public NullWriter append(CharSequence csq)
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
append
public NullWriter append(CharSequence csq, int start, int end)
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
append
public NullWriter append(char c)
- Specified by:
appendin interfaceAppendable- Overrides:
appendin classWriter
-
flush
public void flush()
-
close
public void close()
Description copied from interface:NoCloseCalls to close are ignored whenNoClose.isNoClose(), otherwise some action might be taken which means close calls to this object may not be skipped or assumed to be ignored.
-
-