net.sf.xolite.impl
Class FlowXMLSerializer
java.lang.Object
net.sf.xolite.impl.BaseXMLSerializer
net.sf.xolite.impl.FlowXMLSerializer
- All Implemented Interfaces:
- XMLSerializer
- Direct Known Subclasses:
- ConsoleXMLSerializer, StreamXMLSerializer, StringXMLSerializer
public abstract class FlowXMLSerializer
- extends BaseXMLSerializer
A XMLSerializer
base implementation for all serializer writing the XML in a byte or character stream.
- Author:
- Olivier Berlanger
- See Also:
BaseXMLSerializer
Method Summary |
protected void |
attributeImpl(String uri,
String prefix,
String name,
String value,
int index)
|
protected void |
charactersImpl(String text,
boolean multiLine)
|
protected void |
closeElementStartImpl(boolean complexContent)
|
protected void |
endComplexElementImpl(String uri,
String prefix,
String tag)
|
protected void |
endDocumentImpl()
|
protected void |
endInlineElementImpl(String uri,
String prefix,
String tag)
|
protected void |
endTextElementImpl(String uri,
String prefix,
String tag,
boolean multiLine)
|
int |
getIndentationSpaceCount()
|
boolean |
getWriteXmlHeader()
|
boolean |
isBreakingBetweenAttributes()
|
boolean |
isBreakingForFirstAttribute()
|
boolean |
isUsingLineBreaks()
|
boolean |
isUsingTabs()
|
void |
setAttributeFormatting(boolean breakFirst,
boolean breakOthers)
|
void |
setFormatting(boolean useLineBreaks,
boolean useTabs,
int indentationSpaceCount)
|
void |
setWriteXmlHeader(boolean newWriteXmlHeader)
|
protected void |
startDocumentImpl()
|
protected void |
startElementImpl(String uri,
String prefix,
String tag)
|
protected void |
writeAttributeBreak(boolean simpleIndent)
|
protected abstract void |
writeCharacter(char ch)
|
protected void |
writeDataCharacters(String text)
|
protected void |
writeIndentation(int level)
|
protected abstract void |
writeNewLine()
|
protected void |
writePrefixedName(String prefix,
String tag)
|
protected abstract void |
writeString(String text)
|
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 |
FlowXMLSerializer
public FlowXMLSerializer()
setFormatting
public void setFormatting(boolean useLineBreaks,
boolean useTabs,
int indentationSpaceCount)
setAttributeFormatting
public void setAttributeFormatting(boolean breakFirst,
boolean breakOthers)
getIndentationSpaceCount
public int getIndentationSpaceCount()
isUsingTabs
public boolean isUsingTabs()
isUsingLineBreaks
public boolean isUsingLineBreaks()
isBreakingForFirstAttribute
public boolean isBreakingForFirstAttribute()
isBreakingBetweenAttributes
public boolean isBreakingBetweenAttributes()
getWriteXmlHeader
public boolean getWriteXmlHeader()
setWriteXmlHeader
public void setWriteXmlHeader(boolean newWriteXmlHeader)
startDocumentImpl
protected void startDocumentImpl()
throws IOException
- Specified by:
startDocumentImpl
in class BaseXMLSerializer
- Throws:
IOException
startElementImpl
protected void startElementImpl(String uri,
String prefix,
String tag)
throws IOException,
XMLSerializeException
- Specified by:
startElementImpl
in class BaseXMLSerializer
- Throws:
IOException
XMLSerializeException
attributeImpl
protected void attributeImpl(String uri,
String prefix,
String name,
String value,
int index)
throws IOException
- Specified by:
attributeImpl
in class BaseXMLSerializer
- Throws:
IOException
closeElementStartImpl
protected void closeElementStartImpl(boolean complexContent)
throws IOException
- Specified by:
closeElementStartImpl
in class BaseXMLSerializer
- Throws:
IOException
charactersImpl
protected void charactersImpl(String text,
boolean multiLine)
throws IOException
- Specified by:
charactersImpl
in class BaseXMLSerializer
- Throws:
IOException
endInlineElementImpl
protected void endInlineElementImpl(String uri,
String prefix,
String tag)
throws Exception
- Specified by:
endInlineElementImpl
in class BaseXMLSerializer
- Throws:
Exception
endTextElementImpl
protected void endTextElementImpl(String uri,
String prefix,
String tag,
boolean multiLine)
throws Exception
- Specified by:
endTextElementImpl
in class BaseXMLSerializer
- Throws:
Exception
endComplexElementImpl
protected void endComplexElementImpl(String uri,
String prefix,
String tag)
throws Exception
- Specified by:
endComplexElementImpl
in class BaseXMLSerializer
- Throws:
Exception
writePrefixedName
protected void writePrefixedName(String prefix,
String tag)
throws IOException
- Throws:
IOException
endDocumentImpl
protected void endDocumentImpl()
throws Exception
- Specified by:
endDocumentImpl
in class BaseXMLSerializer
- Throws:
Exception
writeIndentation
protected void writeIndentation(int level)
throws IOException
- Throws:
IOException
writeAttributeBreak
protected void writeAttributeBreak(boolean simpleIndent)
throws IOException
- Throws:
IOException
writeDataCharacters
protected void writeDataCharacters(String text)
throws IOException
- Throws:
IOException
writeNewLine
protected abstract void writeNewLine()
throws IOException
- Throws:
IOException
writeString
protected abstract void writeString(String text)
throws IOException
- Throws:
IOException
writeCharacter
protected abstract void writeCharacter(char ch)
throws IOException
- Throws:
IOException
Copyright © 2012. All Rights Reserved.