Package: org.grails.encoder

## [Java] Class ChainedEncoder

- org.grails.encoder.ChainedEncoder

- All Implemented Interfaces and Traits:
    Encoder, StreamingEncoder

      public class ChainedEncoder
      extends java.lang.Object
      implements Encoder, StreamingEncoder

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `private static class` | `ChainedEncoder.ChainedEncoderCacheItem` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private java.lang.ThreadLocal<ChainedEncoderCacheItem>` | `cacheItemThreadLocal` |
    `private CodecIdentifier` | `combinedCodecIdentifier` |
    `private StreamingEncoder[]` | `encoders` |
    `private boolean` | `safe` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `ChainedEncoder (java.util.List<StreamingEncoder> encoders, boolean safe)`
    `ChainedEncoder (StreamingEncoder[] encoders, boolean safe)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected EncodedAppender` | `chainEncodersAndCachePerThread(EncodedAppender appender)`
    `` | `protected CombinedCodecIdentifier` | `createCodecIdentifier(StreamingEncoder[] encoders)`
    `` | `public static StreamingEncoder` | `createFor(StreamingEncoder[] encoders)`
    `` | `public static StreamingEncoder` | `createFor(java.util.List<StreamingEncoder> encoders)`
    `` | `public static StreamingEncoder` | `createFor(java.util.List<StreamingEncoder> encoders, java.lang.Boolean safe)`
    `` | `protected EncodedAppender` | `doChainEncoders(EncodedAppender appender)`
    `` | `public java.lang.Object` | `encode(java.lang.Object o)`
    `` | `public void` | `encodeToStream(Encoder thisInstance, java.lang.CharSequence source, int offset, int len, EncodedAppender appender, EncodingState encodingState)`
    `` | `public CodecIdentifier` | `getCodecIdentifier()`
    `` | `protected ChainedEncoder.ChainedEncoderCacheItem` | `initialValue()`
    `` | `public boolean` | `isApplyToSafelyEncoded()`
    `` | `public boolean` | `isSafe()`
    `` | `public void` | `markEncoded(java.lang.CharSequence string)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Field Detail

    - #### private final java.lang.ThreadLocal<ChainedEncoderCacheItem> cacheItemThreadLocal

    - #### private final CodecIdentifier combinedCodecIdentifier

    - #### private final StreamingEncoder[] encoders

    - #### private final boolean safe

  - ### Constructor Detail

    - #### public ChainedEncoder(java.util.List<StreamingEncoder> encoders, boolean safe)

    - #### public ChainedEncoder(StreamingEncoder[] encoders, boolean safe)

  - ### Method Detail

    - #### protected EncodedAppender chainEncodersAndCachePerThread(EncodedAppender appender)

    - #### protected CombinedCodecIdentifier createCodecIdentifier(StreamingEncoder[] encoders)

    - #### public static StreamingEncoder createFor(StreamingEncoder[] encoders)

    - #### public static StreamingEncoder createFor(java.util.List<StreamingEncoder> encoders)

    - #### public static StreamingEncoder createFor(java.util.List<StreamingEncoder> encoders, java.lang.Boolean safe)

    - #### protected EncodedAppender doChainEncoders(EncodedAppender appender)

    - #### @java.lang.Override public java.lang.Object encode(java.lang.Object o)

    - #### @java.lang.Override public void encodeToStream(Encoder thisInstance, java.lang.CharSequence source, int offset, int len, EncodedAppender appender, EncodingState encodingState)

    - #### @java.lang.Override public CodecIdentifier getCodecIdentifier()

    - #### protected ChainedEncoder.ChainedEncoderCacheItem initialValue()

    - #### @java.lang.Override public boolean isApplyToSafelyEncoded()

    - #### @java.lang.Override public boolean isSafe()

    - #### @java.lang.Override public void markEncoded(java.lang.CharSequence string)