Package: org.grails.buffer

## [Java] Class StreamCharBuffer.CharBufferChunk

- org.grails.buffer.StreamCharBuffer.CharBufferChunk

-     class StreamCharBuffer.CharBufferChunk
      extends AbstractChunk

  The data in the buffer is stored in a linked list of StreamCharBufferChunks. This class contains data & read/write state for the "chunk level". It contains methods for reading & writing to the chunk level. Underneath the chunk is one more level, the StringChunkGroup + StringChunk. StringChunk makes it possible to directly store the java.lang.String objects.

  Authors:
    Lari Hotari

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `int` | `allocatedBufferId` |
    `char[]` | `buffer` |
    `int` | `lastposition` |
    `int` | `length` |
    `int` | `offset` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CharBufferChunk (int allocatedBufferId, char[] buffer, int offset, int len)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `encodeTo(EncodedAppender appender, Encoder encoder)`
    `` | `public void` | `encodeTo(java.io.Writer writer, EncodesToWriter encoder)`
    `` | `public ChunkReader` | `getChunkReader(boolean removeAfterReading)`
    `` | `public boolean` | `isSingleBuffer()`
    `` | `public int` | `size()`
    `` | `public void` | `writeTo(java.io.Writer target)`

- - ### Field Detail

    - #### int allocatedBufferId

    - #### char[] buffer

    - #### int lastposition

    - #### int length

    - #### int offset

  - ### Constructor Detail

    - #### public CharBufferChunk(int allocatedBufferId, char[] buffer, int offset, int len)

  - ### Method Detail

    - #### @java.lang.Override public void encodeTo(EncodedAppender appender, Encoder encoder)

    - #### @java.lang.Override public void encodeTo(java.io.Writer writer, EncodesToWriter encoder)

    - #### @java.lang.Override public ChunkReader getChunkReader(boolean removeAfterReading)

    - #### public boolean isSingleBuffer()

    - #### @java.lang.Override public int size()

    - #### @java.lang.Override public void writeTo(java.io.Writer target)