Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.web.util
Class StreamCharBuffer.CharBufferChunk

    java.lang.Object
      org.codehaus.groovy.grails.web.util.StreamCharBuffer.AbstractChunk
          org.codehaus.groovy.grails.web.util.StreamCharBuffer.CharBufferChunk

Enclosing class:
  StreamCharBuffer

    final class StreamCharBuffer.CharBufferChunk

extends StreamCharBuffer.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.

Author:
  Lari Hotari

Field Summary
`(package private) int` | `allocatedBufferId`
`(package private) char[]` | `buffer`
`(package private) int` | `lastposition`
`(package private) int` | `length`
`(package private) int` | `offset`

Fields inherited from class org.codehaus.groovy.grails.web.util.StreamCharBuffer.AbstractChunk
`next, prev, writerUsedCounter`

Constructor Summary
`StreamCharBuffer.CharBufferChunk(int allocatedBufferId, char[] buffer, int offset, int len)`

Method Summary
`StreamCharBuffer.ChunkReader` | `getChunkReader(boolean removeAfterReading)`
`boolean` | `isSingleBuffer()`
`int` | `size()`
`void` | `writeTo(Writer target)`

Methods inherited from class org.codehaus.groovy.grails.web.util.StreamCharBuffer.AbstractChunk
`getWriterUsedCounter, subtractFromTotalCount`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### allocatedBufferId

    int allocatedBufferId

### buffer

    char[] buffer

### offset

    int offset

### lastposition

    int lastposition

### length

    int length

Constructor Detail

### StreamCharBuffer.CharBufferChunk

    public StreamCharBuffer.CharBufferChunk(int allocatedBufferId,
                                            char[] buffer,
                                            int offset,
                                            int len)

Method Detail

### writeTo

    public void writeTo(Writer target)
                 throws IOException

  Specified by:
    `writeTo` in class `StreamCharBuffer.AbstractChunk`
  Throws:
    `IOException`

### getChunkReader

    public StreamCharBuffer.ChunkReader getChunkReader(boolean removeAfterReading)

  Specified by:
    `getChunkReader` in class `StreamCharBuffer.AbstractChunk`

### size

    public int size()

  Specified by:
    `size` in class `StreamCharBuffer.AbstractChunk`

### isSingleBuffer

    public boolean isSingleBuffer()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD