Class NullAppendable

  • All Implemented Interfaces:
    java.lang.Appendable

    public class NullAppendable
    extends java.lang.Object
    implements java.lang.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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Appendable append​(char c)  
      java.lang.Appendable append​(java.lang.CharSequence csq)  
      java.lang.Appendable append​(java.lang.CharSequence csq, int start, int end)
      Does nothing except argument validation, like writing to /dev/null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • append

        public java.lang.Appendable append​(char c)
                                    throws java.io.IOException
        Specified by:
        append in interface java.lang.Appendable
        Throws:
        java.io.IOException
      • append

        public java.lang.Appendable append​(java.lang.CharSequence csq)
                                    throws java.io.IOException
        Specified by:
        append in interface java.lang.Appendable
        Throws:
        java.io.IOException
      • append

        public java.lang.Appendable append​(java.lang.CharSequence csq,
                                           int start,
                                           int end)
                                    throws java.io.IOException
        Does nothing except argument validation, like writing to /dev/null.
        Specified by:
        append in interface java.lang.Appendable
        Parameters:
        csq - The character sequence from which a subsequence will be appended. If csq is null, 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:
        this instance.
        Throws:
        java.lang.IndexOutOfBoundsException - If start or end are negative, end is greater than csq.length(), or start is greater than end.
        java.io.IOException