Package com.opensymphony.module.sitemesh
Interface SitemeshBuffer
- All Known Implementing Classes:
DefaultSitemeshBuffer,StringSitemeshBuffer
public interface SitemeshBuffer
A potentially chained sitemesh buffer.
-
Method Summary
Modifier and TypeMethodDescriptionintGet the length of the buffered content.char[]Get the char array for this buffer.intGet the total length of the buffered content, including the length of any chained buffers.intgetTotalLength(int start, int length) Get the total length of the buffered content, including chained buffers from start to length.booleanWhether the buffer has fragments or not.voidWrite this buffer, and any chained sub buffers in the given range, out to the given writer.
-
Method Details
-
getCharArray
char[] getCharArray()Get the char array for this buffer. This array may be longer than the length of the content, you must use getBufferLength() in combination with this method.- Returns:
- The char array for this buffer
-
getBufferLength
int getBufferLength()Get the length of the buffered content.- Returns:
- The length of the buffered content.
-
getTotalLength
int getTotalLength()Get the total length of the buffered content, including the length of any chained buffers.- Returns:
- The total length.
-
getTotalLength
int getTotalLength(int start, int length) Get the total length of the buffered content, including chained buffers from start to length.- Parameters:
start- Where to start counting the length fromlength- Where to finish- Returns:
- THe total length in the given range
-
writeTo
Write this buffer, and any chained sub buffers in the given range, out to the given writer.- Parameters:
writer- The writer to write tostart- The position to start writing fromlength- The length to write- Throws:
IOException- If an error occurred
-
hasFragments
boolean hasFragments()Whether the buffer has fragments or not.- Returns:
- True if it has fragments
-