Save This Page
Home » openjdk-7 » com.sun.org.apache.xml.internal » serializer » [javadoc | source]
com.sun.org.apache.xml.internal.serializer
public final class: ToUnknownStream [javadoc | source]
java.lang.Object
   com.sun.org.apache.xml.internal.serializer.SerializerBase
      com.sun.org.apache.xml.internal.serializer.ToUnknownStream

All Implemented Interfaces:
    SerializationHandler, SerializerConstants

This class wraps another SerializationHandler. The wrapped object will either handler XML or HTML, which is not known until a little later when the first XML tag is seen. If the first tag is then the wrapped object is an HTML handler, otherwise it is an XML handler. This class effectively caches the first few calls to it then passes them on to the wrapped handler (once it exists). After that subsequent calls a simply passed directly to the wrapped handler. The user of this class doesn't know if the output is ultimatley XML or HTML. This class is not a public API, it is public because it is used within Xalan.
Fields inherited from com.sun.org.apache.xml.internal.serializer.SerializerBase:
m_needToCallStartDocument,  m_cdataTagOpen,  m_attributes,  m_inEntityRef,  m_inExternalDTD,  m_needToOutputDocTypeDecl,  m_standaloneWasSpecified,  m_doIndent,  m_indentAmount,  m_cdataSectionElements,  m_prefixMap,  m_tracer,  m_sourceLocator,  m_writer,  m_elemContext,  m_charsBuff,  m_attrBuff,  m_needToCallSetDocumentInfo
Constructor:
 public ToUnknownStream() 
Method from com.sun.org.apache.xml.internal.serializer.ToUnknownStream Summary:
addAttribute,   addAttribute,   addAttribute,   addAttributes,   addUniqueAttribute,   asContentHandler,   asDOMSerializer,   attributeDecl,   characters,   characters,   close,   comment,   comment,   elementDecl,   endCDATA,   endDTD,   endDocument,   endElement,   endElement,   endEntity,   endPrefixMapping,   entityReference,   externalEntityDecl,   firePseudoElement,   flushPending,   getDoctypePublic,   getDoctypeSystem,   getEncoding,   getIndent,   getIndentAmount,   getMediaType,   getNamespaceMappings,   getNamespaceURI,   getNamespaceURIFromPrefix,   getOmitXMLDeclaration,   getOutputFormat,   getOutputStream,   getPrefix,   getStandalone,   getTransformer,   getVersion,   getWriter,   ignorableWhitespace,   internalEntityDecl,   namespaceAfterStartElement,   processingInstruction,   reset,   serialize,   setCdataSectionElements,   setContentHandler,   setDoctype,   setDoctypePublic,   setDoctypeSystem,   setDocumentLocator,   setEncoding,   setEscaping,   setIndent,   setIndentAmount,   setMediaType,   setOmitXMLDeclaration,   setOutputFormat,   setOutputStream,   setSourceLocator,   setStandalone,   setTransformer,   setVersion,   setWriter,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startElement,   startElement,   startEntity,   startPrefixMapping,   startPrefixMapping
Methods from com.sun.org.apache.xml.internal.serializer.SerializerBase:
addAttribute,   addAttribute,   addAttribute,   addAttributeAlways,   addAttributes,   addXSLAttribute,   asContentHandler,   asDOMSerializer,   characters,   close,   comment,   endEntity,   entityReference,   error,   fatalError,   fireCDATAEvent,   fireCharEvent,   fireCommentEvent,   fireEndDoc,   fireEndElem,   fireEndEntity,   fireEntityReference,   fireEscapingEvent,   fireStartDoc,   fireStartElem,   fireStartEntity,   getDoctypePublic,   getDoctypeSystem,   getEncoding,   getIndent,   getIndentAmount,   getLocalName,   getMediaType,   getNamespaceMappings,   getNamespaceURI,   getNamespaceURIFromPrefix,   getOmitXMLDeclaration,   getPrefix,   getPrefixPart,   getStandalone,   getTransformer,   getVersion,   inTemporaryOutputState,   initCDATA,   isCdataSection,   namespaceAfterStartElement,   notationDecl,   patchName,   reset,   setDTDEntityExpansion,   setDoctype,   setDoctypePublic,   setDoctypeSystem,   setDocumentInfo,   setDocumentLocator,   setEncoding,   setIndent,   setIndentAmount,   setMediaType,   setNamespaceMappings,   setOmitXMLDeclaration,   setSourceLocator,   setStandalone,   setStandaloneInternal,   setTransformer,   setVersion,   startDocument,   startDocumentInternal,   unparsedEntityDecl,   warning
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.org.apache.xml.internal.serializer.ToUnknownStream Detail:
 public  void addAttribute(String rawName,
    String value) 
    Adds an attribute to the currenly open tag
 public  void addAttribute(String uri,
    String localName,
    String rawName,
    String type,
    String value) throws SAXException 
    Adds an attribute to the currenly open tag
 public  void addAttribute(String uri,
    String localName,
    String rawName,
    String type,
    String value,
    boolean XSLAttribute) throws SAXException 
    Adds an attribute to the currenly open tag
 public  void addAttributes(Attributes atts) throws SAXException 
 public  void addUniqueAttribute(String rawName,
    String value,
    int flags) throws SAXException 
    Adds a unique attribute to the currenly open tag
 public ContentHandler asContentHandler() throws IOException 
 public DOMSerializer asDOMSerializer() throws IOException 
 public  void attributeDecl(String arg0,
    String arg1,
    String arg2,
    String arg3,
    String arg4) throws SAXException 
    Pass the call on to the underlying handler
 public  void characters(String chars) throws SAXException 
    Converts the String to a character array and calls the SAX method characters(char[],int,int);
 public  void characters(char[] characters,
    int offset,
    int length) throws SAXException 
    Pass the call on to the underlying handler
 public  void close() 
 public  void comment(String comment) throws SAXException 
    Pass the call on to the underlying handler
 public  void comment(char[] ch,
    int start,
    int length) throws SAXException 
    Pass the call on to the underlying handler
 public  void elementDecl(String arg0,
    String arg1) throws SAXException 
    Pass the call on to the underlying handler
 public  void endCDATA() throws SAXException 
    Pass the call on to the underlying handler
 public  void endDTD() throws SAXException 
    Pass the call on to the underlying handler
 public  void endDocument() throws SAXException 
    Pass the call on to the underlying handler
 public  void endElement(String elementName) throws SAXException 
    Pass the call on to the underlying handler
 public  void endElement(String namespaceURI,
    String localName,
    String qName) throws SAXException 
    Pass the call on to the underlying handler
 public  void endEntity(String name) throws SAXException 
    Pass the call on to the underlying handler
 public  void endPrefixMapping(String prefix) throws SAXException 
    Pass the call on to the underlying handler
 public  void entityReference(String entityName) throws SAXException 
 public  void externalEntityDecl(String name,
    String publicId,
    String systemId) throws SAXException 
    Pass the call on to the underlying handler
 protected  void firePseudoElement(String elementName) 
 public  void flushPending() throws SAXException 
 public String getDoctypePublic() 
    Pass the call on to the underlying handler
 public String getDoctypeSystem() 
    Pass the call on to the underlying handler
 public String getEncoding() 
    Pass the call on to the underlying handler
 public boolean getIndent() 
    Pass the call on to the underlying handler
 public int getIndentAmount() 
    Pass the call on to the underlying handler
 public String getMediaType() 
    Pass the call on to the underlying handler
 public NamespaceMappings getNamespaceMappings() 
    Get the current namespace mappings. Simply returns the mappings of the wrapped handler.
 public String getNamespaceURI(String qname,
    boolean isElement) 
 public String getNamespaceURIFromPrefix(String prefix) 
 public boolean getOmitXMLDeclaration() 
    Pass the call on to the underlying handler
 public Properties getOutputFormat() 
 public OutputStream getOutputStream() 
 public String getPrefix(String namespaceURI) 
 public String getStandalone() 
    Pass the call on to the underlying handler
 public Transformer getTransformer() 
 public String getVersion() 
    Pass the call on to the underlying handler
 public Writer getWriter() 
 public  void ignorableWhitespace(char[] ch,
    int start,
    int length) throws SAXException 
    Pass the call on to the underlying handler
 public  void internalEntityDecl(String arg0,
    String arg1) throws SAXException 
    Pass the call on to the underlying handler
 public  void namespaceAfterStartElement(String prefix,
    String uri) throws SAXException 
    This method is used when a prefix/uri namespace mapping is indicated after the element was started with a startElement() and before and endElement(). startPrefixMapping(prefix,uri) would be used before the startElement() call.
 public  void processingInstruction(String target,
    String data) throws SAXException 
    Pass the call on to the underlying handler
 public boolean reset() 
    passes the call on to the underlying HTML or XML handler
 public  void serialize(Node node) throws IOException 
    Converts the DOM node to output
 public  void setCdataSectionElements(Vector URI_and_localNames) 
 public  void setContentHandler(ContentHandler ch) 
 public  void setDoctype(String system,
    String pub) 
 public  void setDoctypePublic(String doctype) 
    Set the doctype in the underlying XML handler. Remember that this method was called, just in case we need to transfer this doctype to an HTML handler
 public  void setDoctypeSystem(String doctype) 
    Set the doctype in the underlying XML handler. Remember that this method was called, just in case we need to transfer this doctype to an HTML handler
 public  void setDocumentLocator(Locator locator) 
    Pass the call on to the underlying handler
 public  void setEncoding(String encoding) 
    Pass the call on to the underlying handler
 public boolean setEscaping(boolean escape) throws SAXException 
 public  void setIndent(boolean indent) 
    Pass the call on to the underlying handler
 public  void setIndentAmount(int value) 
    Pass the call on to the underlying handler
 public  void setMediaType(String mediaType) 
 public  void setOmitXMLDeclaration(boolean b) 
    Pass the call on to the underlying handler
 public  void setOutputFormat(Properties format) 
    Set the properties of the handler
 public  void setOutputStream(OutputStream output) 
    Sets the output stream to write to
 public  void setSourceLocator(SourceLocator locator) 
    This method is used to set the source locator, which might be used to generated an error message.
 public  void setStandalone(String standalone) 
    Pass the call on to the underlying handler
 public  void setTransformer(Transformer t) 
 public  void setVersion(String version) 
    This method cannot be cached because default is different in HTML and XML (we need more than a boolean).
 public  void setWriter(Writer writer) 
    Sets the writer to write to
 public  void skippedEntity(String name) throws SAXException 
    Pass the call on to the underlying handler
 public  void startCDATA() throws SAXException 
    Pass the call on to the underlying handler
 public  void startDTD(String name,
    String publicId,
    String systemId) throws SAXException 
    Pass the call on to the underlying handler
 public  void startDocument() throws SAXException 
 public  void startElement(String qName) throws SAXException 
 public  void startElement(String namespaceURI,
    String localName,
    String qName) throws SAXException 
 public  void startElement(String namespaceURI,
    String localName,
    String elementName,
    Attributes atts) throws SAXException 
 public  void startEntity(String name) throws SAXException 
    Pass the call on to the underlying handler
 public  void startPrefixMapping(String prefix,
    String uri) throws SAXException 
 public boolean startPrefixMapping(String prefix,
    String uri,
    boolean shouldFlush) throws SAXException