Interface Appender

  • All Known Implementing Classes:
    Appenders.AbstractAppender

    public interface Appender
    An interface for classes that know how to dump themselves into an Appendable. This can be used for large string outputs, where writing into an Appendable is faster than creating a string and then writing it in one piece.
    • Method Detail

      • appendTo

        void appendTo​(Appendable appendable)
               throws IOException
        Writes a string representation of this object into the given Appendable.

        It is strongly encouraged that this method behaves identically to appendable.append(this.toString()), except for possibly calling append multiple times with bits of the output.

        Parameters:
        appendable - The appendable, may not be null.
        Throws:
        IOException - If the appendable throws an IOException