Package com.opensymphony.module.sitemesh
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 Summary
Modifier and TypeMethodDescriptionvoidclose()Taken fromWritervoidflush()Taken fromWriterGet the underlying buffer for the writerBecause 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.voidwrite(char[] chars) Taken fromWritervoidwrite(char[] chars, int off, int len) Taken fromWritervoidwrite(int c) Taken fromWritervoidTaken fromWritervoidTaken fromWriterbooleanwriteSitemeshBufferFragment(SitemeshBufferFragment bufferFragment) Write a sitemesh buffer fragment to the writer.
-
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
Taken fromWriter- Parameters:
c- the character to write- Throws:
IOException
-
write
Taken fromWriter- Parameters:
chars- the characters to writeoff- the offset to write fromlen- the length to write- Throws:
IOException
-
write
Taken fromWriter- Parameters:
chars- the characters to write- Throws:
IOException
-
write
Taken fromWriter- Parameters:
str- the characters to writeoff- the offset to write fromlen- the length to write- Throws:
IOException
-
write
Taken fromWriter- Parameters:
str- the characters to write- Throws:
IOException
-
flush
Taken fromWriter- Throws:
IOException
-
close
Taken fromWriter- Throws:
IOException
-
writeSitemeshBufferFragment
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
-