org.kohsuke.stapler.jelly
Class HTMLWriterOutput

java.lang.Object
  extended by org.apache.commons.jelly.XMLOutput
      extended by org.kohsuke.stapler.jelly.HTMLWriterOutput
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

public class HTMLWriterOutput
extends org.apache.commons.jelly.XMLOutput

Wrapper for XMLOutput using HTMLWriter that can turn off its HTML handling (if the Content-Type gets set to something other than text/html).

Author:
Alan.Harder@Sun.Com

Field Summary
 
Fields inherited from class org.apache.commons.jelly.XMLOutput
LEXICAL_HANDLER_NAMES
 
Method Summary
 void close()
           
static HTMLWriterOutput create(java.io.OutputStream out)
           
static HTMLWriterOutput create(java.io.Writer out, boolean escapeText)
           
 void useHTML(boolean enabled)
          False to turn off HTML handling and reenable "/>" for any empty XML element.
 
Methods inherited from class org.apache.commons.jelly.XMLOutput
asWriter, characters, comment, createDummyXMLOutput, createXMLOutput, createXMLOutput, createXMLOutput, createXMLOutput, createXMLOutput, createXMLOutput, endCDATA, endDocument, endDTD, endElement, endElement, endEntity, endPrefixMapping, flush, getContentHandler, getLexicalHandler, ignorableWhitespace, objectData, processingInstruction, setContentHandler, setDocumentLocator, setLexicalHandler, skippedEntity, startCDATA, startDocument, startDTD, startElement, startElement, startElement, startEntity, startPrefixMapping, toString, write, writeCDATA, writeComment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static HTMLWriterOutput create(java.io.OutputStream out)
                               throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

create

public static HTMLWriterOutput create(java.io.Writer out,
                                      boolean escapeText)

close

public void close()
           throws java.io.IOException
Overrides:
close in class org.apache.commons.jelly.XMLOutput
Throws:
java.io.IOException

useHTML

public void useHTML(boolean enabled)
False to turn off HTML handling and reenable "/>" for any empty XML element. True to switch back to default mode with HTML handling.



Copyright © 2011. All Rights Reserved.