Package: org.grails.buffer

## [Java] Class StreamCharBuffer.AllocatedBuffer

- org.grails.buffer.StreamCharBuffer.AllocatedBuffer

-     final class StreamCharBuffer.AllocatedBuffer

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `private char[]` | `buffer` |
    `private int` | `chunkStart` |
    `private EncodingState` | `encodingState` |
    `private int` | `id` |
    `private EncodingState` | `nextEncoders` |
    `private int` | `size` |
    `private int` | `used` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `AllocatedBuffer (int size)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `private final void` | `applyEncoders()`
    `` | `public int` | `charsUsed()`
    `` | `public int` | `chunkSize()`
    `` | `public void` | `clear()`
    `` | `public CharBufferChunk` | `createChunk()` Creates a new chunk from the content written to the buffer (used before adding StringChunk or StreamCharBufferChunk).
    `` | `public void` | `encodeTo(EncodedAppender appender, Encoder encoder)`
    `` | `public void` | `encodeTo(java.io.Writer writer, EncodesToWriter encoder)`
    `` | `public EncodingState` | `getEncodingState()`
    `` | `public boolean` | `hasChunk()`
    `` | `public void` | `reuseBuffer(EncodingState encodingState)`
    `` | `public int` | `spaceLeft(EncodingState encodingState)`
    `` | `public boolean` | `write(char ch)`
    `` | `public final void` | `write(char[] ch, int off, int len)`
    `` | `public final void` | `writeCharArrayAccessible(CharArrayAccessible charArrayAccessible, int off, int len)`
    `` | `public final void` | `writeString(java.lang.String str, int off, int len)`
    `` | `public final void` | `writeStringBuffer(java.lang.StringBuffer stringBuffer, int off, int len)`
    `` | `public final void` | `writeStringBuilder(java.lang.StringBuilder stringBuilder, int off, int len)`
    `` | `public void` | `writeTo(java.io.Writer target)`

  - ### 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 char[] buffer

    - #### private int chunkStart

    - #### private EncodingState encodingState

    - #### private int id

    - #### private EncodingState nextEncoders

    - #### private int size

    - #### private int used

  - ### Constructor Detail

    - #### public AllocatedBuffer(int size)

  - ### Method Detail

    - #### private final void applyEncoders()

    - #### public int charsUsed()

    - #### public int chunkSize()

    - #### public void clear()

    - #### public CharBufferChunk createChunk()

      Creates a new chunk from the content written to the buffer (used before adding StringChunk or StreamCharBufferChunk).

      Returns:
        the chunk

    - #### public void encodeTo(EncodedAppender appender, Encoder encoder)

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

    - #### public EncodingState getEncodingState()

    - #### public boolean hasChunk()

    - #### public void reuseBuffer(EncodingState encodingState)

    - #### public int spaceLeft(EncodingState encodingState)

    - #### public boolean write(char ch)

    - #### public final void write(char[] ch, int off, int len)

    - #### public final void writeCharArrayAccessible(CharArrayAccessible charArrayAccessible, int off, int len)

    - #### public final void writeString(java.lang.String str, int off, int len)

    - #### public final void writeStringBuffer(java.lang.StringBuffer stringBuffer, int off, int len)

    - #### public final void writeStringBuilder(java.lang.StringBuilder stringBuilder, int off, int len)

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