Package java.lang

Interface Appendable

    • Method Detail

      • append

        Appendable append​(char c)
                   throws IOException
        Appends the specified character.
        Parameters:
        c - the character to append.
        Returns:
        this Appendable.
        Throws:
        IOException - if an I/O error occurs.
      • append

        Appendable append​(CharSequence csq)
                   throws IOException
        Appends the character sequence csq. Implementation classes may not append the whole sequence, for example if the target is a buffer with limited size.

        If csq is null, the characters "null" are appended.

        Parameters:
        csq - the character sequence to append.
        Returns:
        this Appendable.
        Throws:
        IOException - if an I/O error occurs.
      • append

        Appendable append​(CharSequence csq,
                          int start,
                          int end)
                   throws IOException
        Appends a subsequence of csq.

        If csq is not null then calling this method is equivalent to calling append(csq.subSequence(start, end)).

        If csq is null, the characters "null" are appended.

        Parameters:
        csq - the character sequence to append.
        start - the first index of the subsequence of csq that is appended.
        end - the last index of the subsequence of csq that is appended.
        Returns:
        this Appendable.
        Throws:
        IndexOutOfBoundsException - if start < 0, end < 0, start > end or end is greater than the length of csq.
        IOException - if an I/O error occurs.