public class StringSitemeshBuffer extends java.lang.Object implements SitemeshBuffer
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
buffer |
Constructor and Description |
---|
StringSitemeshBuffer(java.lang.String buffer) |
Modifier and Type | Method and Description |
---|---|
static SitemeshBufferFragment |
createBufferFragment(java.lang.String buffer) |
int |
getBufferLength()
Get the length of the buffered content.
|
char[] |
getCharArray()
Get the char array for this buffer.
|
int |
getTotalLength()
Get the total length of the buffered content, including the length of any chained buffers.
|
int |
getTotalLength(int start,
int length)
Get the total length of the buffered content, including chained buffers from start to length
|
boolean |
hasFragments()
Whether the buffer has fragments or not
|
void |
writeTo(java.io.Writer writer,
int start,
int length)
Write this buffer, and any chained sub buffers in the given range, out to the given writer
|
public char[] getCharArray()
SitemeshBuffer
getCharArray
in interface SitemeshBuffer
public int getBufferLength()
SitemeshBuffer
getBufferLength
in interface SitemeshBuffer
public int getTotalLength()
SitemeshBuffer
getTotalLength
in interface SitemeshBuffer
public int getTotalLength(int start, int length)
SitemeshBuffer
getTotalLength
in interface SitemeshBuffer
start
- Where to start counting the length fromlength
- Where to finishpublic void writeTo(java.io.Writer writer, int start, int length) throws java.io.IOException
SitemeshBuffer
writeTo
in interface SitemeshBuffer
writer
- The writer to write tostart
- The position to start writing fromlength
- The length to writejava.io.IOException
- If an error occurredpublic boolean hasFragments()
SitemeshBuffer
hasFragments
in interface SitemeshBuffer
public static SitemeshBufferFragment createBufferFragment(java.lang.String buffer)