Class NullAppendable
java.lang.Object
org.apache.commons.io.output.NullAppendable
- All Implemented Interfaces:
Appendable
Appends all data to the famous /dev/null.
This Appendable has no destination (file/socket etc.) and all characters written to it are ignored and lost.
- Since:
- 2.8.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) append(CharSequence csq) append(CharSequence csq, int start, int end) Does nothing except argument validation, like writing to/dev/null.
-
Field Details
-
INSTANCE
A singleton.
-
-
Method Details
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
Does nothing except argument validation, like writing to/dev/null.- Specified by:
appendin interfaceAppendable- Parameters:
csq- The character sequence from which a subsequence will be appended. Ifcsqisnull, it is treated as if it were"null".start- The index of the first character in the subsequence.end- The index of the character following the last character in the subsequence.- Returns:
thisinstance.- Throws:
IndexOutOfBoundsException- Ifstartorendare negative,endis greater thancsq.length(), orstartis greater thanend.IOException
-