Interface SitemeshBuffer

All Known Implementing Classes:
DefaultSitemeshBuffer, StringSitemeshBuffer

public interface SitemeshBuffer
A potentially chained sitemesh buffer.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the length of the buffered content.
    char[]
    Get the char array for this buffer.
    int
    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
    Whether the buffer has fragments or not.
    void
    writeTo(Writer writer, int start, int length)
    Write 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 from
      length - Where to finish
      Returns:
      THe total length in the given range
    • writeTo

      void writeTo(Writer writer, int start, int length) throws IOException
      Write this buffer, and any chained sub buffers in the given range, out to the given writer.
      Parameters:
      writer - The writer to write to
      start - The position to start writing from
      length - 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