org.jasig.portal.serialize
Interface CachingSerializer

All Superinterfaces:
ContentHandler, DeclHandler, DocumentHandler, DOMSerializer, DTDHandler, IAnchoringSerializer, LexicalHandler, MarkupSerializer, Serializer
All Known Implementing Classes:
CachingHTMLSerializer, CachingXHTMLSerializer, DebugCachingSerializer

public interface CachingSerializer
extends MarkupSerializer

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

Author:
Peter Kharchenko pkharchenko@interactivebusiness.com"

Method Summary
 void flush()
          Flushes all the buffers
 String getCache()
          Asks serializer for an accumulated cache content.
 void printRawCharacters(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.
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.DocumentHandler
characters, endDocument, endElement, ignorableWhitespace, processingInstruction, setDocumentLocator, startDocument, startElement
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 
Methods inherited from interface org.xml.sax.DTDHandler
notationDecl, unparsedEntityDecl
 
Methods inherited from interface org.xml.sax.ext.DeclHandler
attributeDecl, elementDecl, externalEntityDecl, internalEntityDecl
 
Methods inherited from interface org.jasig.portal.serialize.DOMSerializer
serialize, serialize, serialize
 
Methods inherited from interface org.jasig.portal.serialize.Serializer
asContentHandler, asDocumentHandler, asDOMSerializer, setOutputByteStream, setOutputCharStream, setOutputFormat
 
Methods inherited from interface org.jasig.portal.IAnchoringSerializer
startAnchoring, stopAnchoring
 

Method Detail

startCaching

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

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

stopCaching

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

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

getCache

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

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

printRawCharacters

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

Parameters:
text - a String value
Throws:
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 IOException
Flushes all the buffers

Specified by:
flush in interface MarkupSerializer
Throws:
IOException - if an error occurs


Copyright © 2010 Jasig. All Rights Reserved.