Interface SitemeshWriter

All Known Implementing Classes:
OutputLengthObservantSitemeshWriter, RoutablePrintWriter, SecondaryStorageBufferWriter, SitemeshBufferWriter, SitemeshPrintWriter

public interface SitemeshWriter
A SiteMesh buffer writer. Provides the ability to defer the writing of a page body until it is finally written to the stream, so it isn't copied from buffer to buffer.
  • Method Details

    • getUnderlyingWriter

      Writer getUnderlyingWriter()
      Because writer is a class and not an interface we need a way to self reference so we can pass the underlying Writer onto other Writers.
      Returns:
      a self reference to this so it can be wrapped say.
    • write

      void write(int c) throws IOException
      Taken from Writer
      Parameters:
      c - the character to write
      Throws:
      IOException
    • write

      void write(char[] chars, int off, int len) throws IOException
      Taken from Writer
      Parameters:
      chars - the characters to write
      off - the offset to write from
      len - the length to write
      Throws:
      IOException
    • write

      void write(char[] chars) throws IOException
      Taken from Writer
      Parameters:
      chars - the characters to write
      Throws:
      IOException
    • write

      void write(String str, int off, int len) throws IOException
      Taken from Writer
      Parameters:
      str - the characters to write
      off - the offset to write from
      len - the length to write
      Throws:
      IOException
    • write

      void write(String str) throws IOException
      Taken from Writer
      Parameters:
      str - the characters to write
      Throws:
      IOException
    • flush

      void flush() throws IOException
      Taken from Writer
      Throws:
      IOException
    • close

      void close() throws IOException
      Taken from Writer
      Throws:
      IOException
    • writeSitemeshBufferFragment

      boolean writeSitemeshBufferFragment(SitemeshBufferFragment bufferFragment) throws IOException
      Write a sitemesh buffer fragment to the writer. This may not be written immediately, it may be stored and written later, when this buffer is written out to a writer.
      Parameters:
      bufferFragment - The buffer fragment to write
      Returns:
      True if the buffer was written immediately, or false if it will be written later
      Throws:
      IOException - If an IOException occurred
    • getSitemeshBuffer

      SitemeshBuffer getSitemeshBuffer()
      Get the underlying buffer for the writer
      Returns:
      The underlying buffer