|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.serialize.BaseMarkupSerializer
org.jasig.portal.serialize.HTMLSerializer
org.jasig.portal.serialize.CachingHTMLSerializer
public final class CachingHTMLSerializer
Caching version of the HTML serializer
Serializer| Field Summary |
|---|
| Fields inherited from class org.jasig.portal.serialize.HTMLSerializer |
|---|
XHTMLNamespace |
| Fields inherited from class org.jasig.portal.serialize.BaseMarkupSerializer |
|---|
_docTypePublicId, _docTypeSystemId, _encodingInfo, _format, _indenting, _prefixes, _printer, _started, anchorId, fCurrentNode, fDOMError, fDOMErrorHandler, fDOMFilter, features, fStrBuffer |
| Constructor Summary | |
|---|---|
|
CachingHTMLSerializer()
Constructs a new serializer. |
protected |
CachingHTMLSerializer(boolean xhtml,
OutputFormat format)
Constructs a new HTML/XHTML serializer depending on the value of xhtml. |
|
CachingHTMLSerializer(OutputFormat format)
Constructs a new serializer. |
|
CachingHTMLSerializer(OutputStream output,
OutputFormat format)
Constructs a new serializer that writes to the specified output stream using the specified output format. |
|
CachingHTMLSerializer(Writer writer,
OutputFormat format)
Constructs a new serializer that writes to the specified writer using the specified output format. |
| 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. |
void |
setOutputByteStream(OutputStream output)
Specifies an output stream to which the document should be serialized. |
void |
setOutputCharStream(Writer writer)
Specifies a writer to which the document should be serialized. |
void |
setOutputFormat(OutputFormat format)
Specifies an output format for this serializer. |
boolean |
startCaching()
When starting caching if we are inside an opening tag the ">" will be written in order for the ">" to be included with the correct cache. |
boolean |
stopCaching()
When stopping caching if we are inside an opening tag the ">" will be written in order for the ">" to be included with the correct cache. |
| Methods inherited from class org.jasig.portal.serialize.HTMLSerializer |
|---|
appendAnchorIfNecessary, characters, characters, endElement, endElement, endElementIO, escapeURI, getEntityRef, serializeElement, setXHTMLNamespace, shouldNotExpandEndTagForEmptyElement, startAnchoring, startDocument, startElement, startElement, stopAnchoring |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
| Methods inherited from interface org.jasig.portal.IAnchoringSerializer |
|---|
startAnchoring, stopAnchoring |
| Constructor Detail |
|---|
public CachingHTMLSerializer()
setOutputCharStream(java.io.Writer) or setOutputByteStream(java.io.OutputStream)
first.
protected CachingHTMLSerializer(boolean xhtml,
OutputFormat format)
xhtml - True if XHTML serializingpublic CachingHTMLSerializer(OutputFormat format)
setOutputCharStream(java.io.Writer) or setOutputByteStream(java.io.OutputStream)
first.
public CachingHTMLSerializer(Writer writer,
OutputFormat format)
writer - The writer to useformat - The output format to use, null for the default
public CachingHTMLSerializer(OutputStream output,
OutputFormat format)
output - The output stream to useformat - The output format to use, null for the default| Method Detail |
|---|
public void setOutputCharStream(Writer writer)
Serializer
setOutputCharStream in interface SerializersetOutputCharStream in class BaseMarkupSerializerpublic void setOutputByteStream(OutputStream output)
Serializer
setOutputByteStream in interface SerializersetOutputByteStream in class BaseMarkupSerializerpublic void setOutputFormat(OutputFormat format)
Serializer
setOutputFormat in interface SerializersetOutputFormat in class HTMLSerializerformat - The output format to use
public boolean startCaching()
throws IOException
startCaching in interface CachingSerializerfalse if the serializer is already caching.
IOException
public boolean stopCaching()
throws IOException
stopCaching in interface CachingSerializerfalse if the serializer was NOT caching.
IOException
public String getCache()
throws UnsupportedEncodingException,
IOException
CachingSerializer
getCache in interface CachingSerializerString cache.
UnsupportedEncodingException - if the OutputFormat specified unsupported encoding
IOException
public void printRawCharacters(String text)
throws IOException
String of characters directly to the output stream.
printRawCharacters in interface CachingSerializertext - a String value
IOExceptionpublic void setDocumentStarted(boolean setting)
setDocumentStarted in interface CachingSerializersetting - a boolean value
public void flush()
throws IOException
CachingSerializer
flush in interface CachingSerializerflush in interface MarkupSerializerflush in class BaseMarkupSerializerIOException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||