org.jasig.portal.serialize
Interface CachingSerializer

All Known Implementing Classes:
CachingHTMLSerializer, CachingXHTMLSerializer

public interface CachingSerializer

CachingSerializer interface allows low-level character interaction with a serializer.

Author:
Peter Kharchenko

Method Summary
 void flush()
          Flushes all the buffers
 java.lang.String getCache()
          Asks serializer for an accumulated cache content.
 void printRawCharacters(java.lang.String text)
          Allows one to print a String of characters directly to the output stream.
 void setDocumentStarted(boolean setting)
          Let the serializer know if the document has already been started.
 boolean startCaching()
          Commands serializer to start caching.
 boolean stopCaching()
          Commands serializer to stop caching.
 

Method Detail

startCaching

boolean startCaching()
                     throws java.io.IOException
Commands serializer to start caching.

Returns:
false if the serializer is already caching.
Throws:
java.io.IOException

stopCaching

boolean stopCaching()
                    throws java.io.IOException
Commands serializer to stop caching.

Returns:
false if the serializer was NOT caching.
Throws:
java.io.IOException

getCache

java.lang.String getCache()
                          throws java.io.UnsupportedEncodingException,
                                 java.io.IOException
Asks serializer for an accumulated cache content.

Returns:
a String cache.
Throws:
java.io.UnsupportedEncodingException - if the OutputFormat specified unsupported encoding
java.io.IOException

printRawCharacters

void printRawCharacters(java.lang.String text)
                        throws java.io.IOException
Allows one to print a String of characters directly to the output stream.

Parameters:
text - a String value
Throws:
java.io.IOException

setDocumentStarted

void setDocumentStarted(boolean setting)
Let the serializer know if the document has already been started.

Parameters:
setting - a boolean value

flush

void flush()
           throws java.io.IOException
Flushes all the buffers

Throws:
java.io.IOException - if an error occurs