|
||||||||||
| 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 | |
|---|---|
(package private) CharacterCachingWriter |
cacher
|
(package private) java.lang.String |
encoding
|
| Fields inherited from class org.jasig.portal.serialize.HTMLSerializer |
|---|
XHTMLNamespace |
| Fields inherited from class org.jasig.portal.serialize.BaseMarkupSerializer |
|---|
_docTypePublicId, _docTypeSystemId, _format, _indenting, _prefixes, _printer, _started |
| 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(java.io.OutputStream output,
OutputFormat format)
Constructs a new serializer that writes to the specified output stream using the specified output format. |
|
CachingHTMLSerializer(java.io.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 |
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. |
void |
setOutputByteStream(java.io.OutputStream output)
Specifies an output stream to which the document should be serialized. |
void |
setOutputCharStream(java.io.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, startAnchoring, startDocument, startElement, startElement, stopAnchoring |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
CharacterCachingWriter cacher
java.lang.String encoding
| 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(java.io.Writer writer,
OutputFormat format)
writer - The writer to useformat - The output format to use, null for the default
public CachingHTMLSerializer(java.io.OutputStream output,
OutputFormat format)
output - The output stream to useformat - The output format to use, null for the default| Method Detail |
|---|
public void setOutputCharStream(java.io.Writer writer)
Serializer
setOutputCharStream in interface SerializersetOutputCharStream in class BaseMarkupSerializerpublic void setOutputByteStream(java.io.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 java.io.IOException
startCaching in interface CachingSerializerfalse if the serializer is already caching.
java.io.IOException
public boolean stopCaching()
throws java.io.IOException
stopCaching in interface CachingSerializerfalse if the serializer was NOT caching.
java.io.IOException
public java.lang.String getCache()
throws java.io.UnsupportedEncodingException,
java.io.IOException
CachingSerializer
getCache in interface CachingSerializerString cache.
java.io.UnsupportedEncodingException - if the OutputFormat specified unsupported encoding
java.io.IOException
public void printRawCharacters(java.lang.String text)
throws java.io.IOException
String of characters directly to the output stream.
printRawCharacters in interface CachingSerializertext - a String value
java.io.IOExceptionpublic void setDocumentStarted(boolean setting)
setDocumentStarted in interface CachingSerializersetting - a boolean value
public void flush()
throws java.io.IOException
CachingSerializer
flush in interface CachingSerializerjava.io.IOException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||