org.oXML.engine
Class StreamResultHandler

java.lang.Object
  extended byorg.oXML.engine.StreamResultHandler
All Implemented Interfaces:
ResultHandler

public class StreamResultHandler
extends java.lang.Object
implements ResultHandler


Constructor Summary
StreamResultHandler(java.io.OutputStream out)
          create a new StreamResultHandler using the default character encoding
StreamResultHandler(java.io.OutputStream out, java.lang.String encoding)
          create a new StreamResultHandler using the specified character encoding
StreamResultHandler(java.io.PrintWriter out)
           
StreamResultHandler(java.io.Writer out)
           
 
Method Summary
 java.lang.String closed(Name name)
           
 void comment(java.lang.String text)
           
protected  java.lang.String createNamespaceDeclaration(java.lang.String uri)
           
 void end()
          called after end of output
 void endDocumentType()
           
 void endElement(Name name)
           
 void entityDeclaration(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)
           
static java.lang.String escape(java.lang.String data)
          perform character escaping of &, < and > chars
protected  void fill()
           
 java.lang.Object getResult()
           
 void notationDeclaration(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
           
protected  void printAttribute(Name name, java.lang.String value)
           
protected  void printNamespaceDeclaration(java.lang.String prefix, java.lang.String uri)
           
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 void start(java.lang.String contenttype)
          called before start of output
 void startDocumentType(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String internalSubset)
           
 void startElement(Name name, java.util.Collection attributes)
           
 void text(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamResultHandler

public StreamResultHandler(java.io.OutputStream out)
create a new StreamResultHandler using the default character encoding


StreamResultHandler

public StreamResultHandler(java.io.OutputStream out,
                           java.lang.String encoding)
                    throws java.io.UnsupportedEncodingException
create a new StreamResultHandler using the specified character encoding


StreamResultHandler

public StreamResultHandler(java.io.Writer out)

StreamResultHandler

public StreamResultHandler(java.io.PrintWriter out)
Method Detail

getResult

public java.lang.Object getResult()
Specified by:
getResult in interface ResultHandler

text

public void text(java.lang.String text)
Specified by:
text in interface ResultHandler

comment

public void comment(java.lang.String text)
Specified by:
comment in interface ResultHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
Specified by:
processingInstruction in interface ResultHandler

startElement

public void startElement(Name name,
                         java.util.Collection attributes)
Specified by:
startElement in interface ResultHandler

fill

protected void fill()

createNamespaceDeclaration

protected java.lang.String createNamespaceDeclaration(java.lang.String uri)

printNamespaceDeclaration

protected void printNamespaceDeclaration(java.lang.String prefix,
                                         java.lang.String uri)

printAttribute

protected void printAttribute(Name name,
                              java.lang.String value)

closed

public java.lang.String closed(Name name)

endElement

public void endElement(Name name)
Specified by:
endElement in interface ResultHandler

escape

public static final java.lang.String escape(java.lang.String data)
perform character escaping of &, < and > chars


start

public void start(java.lang.String contenttype)
Description copied from interface: ResultHandler
called before start of output

Specified by:
start in interface ResultHandler

end

public void end()
Description copied from interface: ResultHandler
called after end of output

Specified by:
end in interface ResultHandler

startDocumentType

public void startDocumentType(java.lang.String name,
                              java.lang.String publicId,
                              java.lang.String systemId,
                              java.lang.String internalSubset)
Specified by:
startDocumentType in interface ResultHandler

endDocumentType

public void endDocumentType()
Specified by:
endDocumentType in interface ResultHandler

notationDeclaration

public void notationDeclaration(java.lang.String name,
                                java.lang.String publicId,
                                java.lang.String systemId)
Specified by:
notationDeclaration in interface ResultHandler

entityDeclaration

public void entityDeclaration(java.lang.String name,
                              java.lang.String publicId,
                              java.lang.String systemId,
                              java.lang.String notationName)
Specified by:
entityDeclaration in interface ResultHandler
Parameters:
notationName - For unparsed entities, the name of the notation for the entity. For parsed entities, this is null.