org.codehaus.groovy.grails.web.util
Class StreamCharBuffer.StreamCharBufferChunk
java.lang.Object
org.codehaus.groovy.grails.web.util.StreamCharBuffer.StreamCharBufferChunk
- Enclosing class:
- StreamCharBuffer
static final class StreamCharBuffer.StreamCharBufferChunk
- extends Object
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
Method Summary |
void |
appendStringChunk(String str,
int off,
int len)
|
int |
charsUnread()
|
int |
chunkSize()
|
void |
read(char[] ch,
int off,
int len)
|
void |
reuseBuffer()
|
int |
spaceLeft()
|
boolean |
write(char ch)
|
void |
write(char[] ch,
int off,
int len)
|
void |
writeString(String str,
int off,
int len)
|
void |
writeStringBuffer(StringBuffer stringBuffer,
int off,
int len)
|
void |
writeStringBuilder(StringBuilder stringBuilder,
int off,
int len)
|
int |
writeTo(Writer target)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamCharBuffer.StreamCharBufferChunk
public StreamCharBuffer.StreamCharBufferChunk(int size)
reuseBuffer
public void reuseBuffer()
write
public boolean write(char ch)
chunkSize
public int chunkSize()
write
public void write(char[] ch,
int off,
int len)
appendStringChunk
public void appendStringChunk(String str,
int off,
int len)
throws IOException
- Throws:
IOException
writeString
public void writeString(String str,
int off,
int len)
writeStringBuilder
public void writeStringBuilder(StringBuilder stringBuilder,
int off,
int len)
writeStringBuffer
public void writeStringBuffer(StringBuffer stringBuffer,
int off,
int len)
read
public void read(char[] ch,
int off,
int len)
writeTo
public int writeTo(Writer target)
throws IOException
- Throws:
IOException
charsUnread
public int charsUnread()
spaceLeft
public int spaceLeft()
Copyright (c) 2005-2009 The Grails project