net.sf.xolite.utils
Class StreamXMLSerializer

java.lang.Object
  extended by net.sf.xolite.impl.BaseXMLSerializer
      extended by net.sf.xolite.impl.FlowXMLSerializer
          extended by net.sf.xolite.utils.StreamXMLSerializer
All Implemented Interfaces:
XMLSerializer

public class StreamXMLSerializer
extends FlowXMLSerializer

A XMLSerializer implementation writing a tree of java XMLSerializable objects as XML into an output stream.

Author:
Olivier Berlanger
See Also:
StreamXMLSerializer

Field Summary
 
Fields inherited from class net.sf.xolite.impl.BaseXMLSerializer
STATE_ELEMENT_CLOSED, STATE_ELEMENT_START_CLOSED, STATE_ELEMENT_START_OPENED, STATE_FINISHED, STATE_INIT, STATE_TEXT, STATE_TEXT_MULTI_LINE
 
Constructor Summary
StreamXMLSerializer(OutputStream stream)
           
StreamXMLSerializer(OutputStream stream, String encoding)
           
 
Method Summary
protected  void endDocumentImpl()
           
 boolean getAutoCloseWriter()
           
 void serializeObject(XMLSerializable serial)
           
 void setAutoCloseWriter(boolean newAutoCloseWriter)
           
protected  void startDocumentImpl()
           
protected  void writeCharacter(char ch)
           
protected  void writeNewLine()
           
protected  void writeString(String text)
           
 
Methods inherited from class net.sf.xolite.impl.FlowXMLSerializer
attributeImpl, charactersImpl, closeElementStartImpl, endComplexElementImpl, endInlineElementImpl, endTextElementImpl, getIndentationSpaceCount, getWriteXmlHeader, isBreakingBetweenAttributes, isBreakingForFirstAttribute, isUsingLineBreaks, isUsingTabs, setAttributeFormatting, setFormatting, setWriteXmlHeader, startElementImpl, writeAttributeBreak, writeDataCharacters, writeIndentation, writePrefixedName
 
Methods inherited from class net.sf.xolite.impl.BaseXMLSerializer
attribute, attribute, characters, charactersMultiLine, definePrefixMapping, endDocument, endElement, getCustomObject, getLastElementLength, getLastElementName, getLevel, putCustomObject, simpleElement, startDocument, startElement, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamXMLSerializer

public StreamXMLSerializer(OutputStream stream)
                    throws IOException
Throws:
IOException

StreamXMLSerializer

public StreamXMLSerializer(OutputStream stream,
                           String encoding)
                    throws IOException
Throws:
IOException
Method Detail

serializeObject

public void serializeObject(XMLSerializable serial)
                     throws XMLSerializeException
Throws:
XMLSerializeException

getAutoCloseWriter

public boolean getAutoCloseWriter()

setAutoCloseWriter

public void setAutoCloseWriter(boolean newAutoCloseWriter)

startDocumentImpl

protected void startDocumentImpl()
                          throws IOException
Overrides:
startDocumentImpl in class FlowXMLSerializer
Throws:
IOException

endDocumentImpl

protected void endDocumentImpl()
                        throws IOException
Overrides:
endDocumentImpl in class FlowXMLSerializer
Throws:
IOException

writeNewLine

protected void writeNewLine()
                     throws IOException
Specified by:
writeNewLine in class FlowXMLSerializer
Throws:
IOException

writeString

protected void writeString(String text)
                    throws IOException
Specified by:
writeString in class FlowXMLSerializer
Throws:
IOException

writeCharacter

protected void writeCharacter(char ch)
                       throws IOException
Specified by:
writeCharacter in class FlowXMLSerializer
Throws:
IOException


Copyright © 2012. All Rights Reserved.