Package net.sf.saxon.tree.util

## Interface CharSequenceConsumer

- All Known Implementing Classes:
    `FastStringBuffer`, `StringValue.Builder`

      public interface CharSequenceConsumer

  Interface that accepts a string in the form of a sequence of CharSequences, which are conceptually concatenated (though in some implementations, the final string may never be materialized in memory)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `default CharSequenceConsumer` | `cat​(char c)` | Process a single character.
    `CharSequenceConsumer` | `cat​(java.lang.CharSequence chars)` | Process a supplied character sequence
    `default void` | `close()` | Complete the writing of characters to the result.
    `default void` | `open()` | Initial processing.

- - ### Method Detail

    - #### open

          default void open()
                     throws XPathException

      Initial processing. This should be called before any calls on append. Default implementation does nothing.
      Throws:
        `XPathException` - if processing fails for any reason

    - #### cat

          CharSequenceConsumer cat​(java.lang.CharSequence chars)
                            throws XPathException

      Process a supplied character sequence
      Parameters:
        `chars` - the characters to be processed
      Returns:
        this CharSequenceConsumer (to allow method chaining)
      Throws:
        `XPathException` - if processing fails for any reason

    - #### cat

          default CharSequenceConsumer cat​(char c)
                                    throws XPathException

      Process a single character. The default implementation invokes `cat(CharSequence)`.
      Parameters:
        `c` - the character to be processed
      Returns:
        this CharSequenceConsumer
      Throws:
        `XPathException` - if processing fails for any reason

    - #### close

          default void close()
                      throws XPathException

      Complete the writing of characters to the result. The default implementation does nothing.
      Throws:
        `XPathException` - if processing fails for any reason