Package: org.grails.encoder

## [Java] Class EncodedAppenderWriter

- org.grails.encoder.EncodedAppenderWriter

- All Implemented Interfaces and Traits:
    EncodedAppenderFactory, EncodedAppenderWriterFactory, EncoderAware

      public class EncodedAppenderWriter
      extends java.io.Writer
      implements EncodedAppenderFactory, EncodedAppenderWriterFactory, EncoderAware

  A java.io.Writer implementation that writes to a EncodedAppender with a certain encoder This class isn't thread-safe.

  Authors:
    Lari Hotari
  Since:
    2.3

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected EncodedAppender` | `encodedAppender` |
    `protected Encoder` | `encoder` |
    `protected EncodingStateRegistry` | `encodingStateRegistry` |
    `private char[]` | `singleCharBuffer` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `EncodedAppenderWriter (EncodedAppender encodedAppender, Encoder encoder, EncodingStateRegistry encodingStateRegistry)` Default constructor

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public java.io.Writer` | `append(java.lang.CharSequence csq)`
    `` | `public java.io.Writer` | `append(java.lang.CharSequence csq, int start, int end)`
    `` | `public java.io.Writer` | `append(char c)`
    `` | `public void` | `close()`
    `` | `public void` | `flush()`
    `` | `public EncodedAppender` | `getEncodedAppender()`
    `` | `public Encoder` | `getEncoder()`
    `` | `public java.io.Writer` | `getWriterForEncoder(Encoder encoder, EncodingStateRegistry encodingStateRegistry)`
    `` | `public void` | `write(char[] cbuf, int off, int len)`
    `` | `public void` | `write(int c)`
    `` | `public void` | `write(java.lang.String str, int off, int len)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.io.Writer` | `java.io.Writer#append(java.lang.CharSequence, int, int), java.io.Writer#append(java.lang.CharSequence, int, int), java.io.Writer#append(char), java.io.Writer#append(char), java.io.Writer#append(java.lang.CharSequence), java.io.Writer#append(java.lang.CharSequence), java.io.Writer#write(int), java.io.Writer#write([C), java.io.Writer#write([C, int, int), java.io.Writer#write(java.lang.String), java.io.Writer#write(java.lang.String, int, int), java.io.Writer#flush(), java.io.Writer#close(), java.io.Writer#nullWriter(), java.io.Writer#wait(long), java.io.Writer#wait(long, int), java.io.Writer#wait(), java.io.Writer#equals(java.lang.Object), java.io.Writer#toString(), java.io.Writer#hashCode(), java.io.Writer#getClass(), java.io.Writer#notify(), java.io.Writer#notifyAll()`

- - ### Field Detail

    - #### protected EncodedAppender encodedAppender

    - #### protected Encoder encoder

    - #### protected EncodingStateRegistry encodingStateRegistry

    - #### private char[] singleCharBuffer

  - ### Constructor Detail

    - #### public EncodedAppenderWriter(EncodedAppender encodedAppender, Encoder encoder, EncodingStateRegistry encodingStateRegistry)

      Default constructor

      Parameters:
        `encodedAppender` - the EncodedAppender destination
        `encoder` - the encoder to use
        `encodingStateRegistry` - the EncodingStateRegistry to use to lookup encoding state of CharSequence instances

  - ### Method Detail

    - #### @java.lang.Override public java.io.Writer append(java.lang.CharSequence csq)

    - #### @java.lang.Override public java.io.Writer append(java.lang.CharSequence csq, int start, int end)

    - #### @java.lang.Override public java.io.Writer append(char c)

    - #### @java.lang.Override public void close()

    - #### @java.lang.Override public void flush()

    - #### public EncodedAppender getEncodedAppender()

    - #### public Encoder getEncoder()

    - #### public java.io.Writer getWriterForEncoder(Encoder encoder, EncodingStateRegistry encodingStateRegistry)

    - #### @java.lang.Override public void write(char[] cbuf, int off, int len)

    - #### @java.lang.Override public void write(int c)

    - #### @java.lang.Override public void write(java.lang.String str, int off, int len)