org.noos.xing.mydoggy.plaf.persistence.xml
Class XMLWriter

java.lang.Object
  extended by org.noos.xing.mydoggy.plaf.persistence.xml.XMLWriter

public class XMLWriter
extends Object


Field Summary
protected  int depth
           
protected  int elementLevel
           
protected  Attributes EMPTY_ATTS
           
protected  int indentStep
           
protected  Writer output
           
protected static Object SEEN_DATA
           
protected static Object SEEN_ELEMENT
           
protected static Object SEEN_NOTHING
           
protected  Object state
           
protected  Stack<Object> stateStack
           
 
Constructor Summary
XMLWriter(Writer writer)
           
 
Method Summary
 void cdata(String s)
           
 void characters(char[] ch, int start, int len)
           
 void characters(String data)
           
 void close()
           
 void dataElement(String elementName, Attributes atts)
           
 void dataElement(String elementName, Attributes atts, String content)
           
protected  void doIndent()
           
 void endDocument()
           
 void endElement(String elementName)
           
 void flush()
           
 int getIndentStep()
           
 Writer getOutput()
           
 void ignorableWhitespace(char[] ch, int start, int length)
           
protected  void init(Writer writer)
           
 void processingInstruction(String target, String data)
           
 void reset()
           
 void setDepth(int depth)
           
 void setIndentStep(int indentStep)
           
 void setOutput(Writer writer)
           
 void startDocument()
           
 void startElement(String localName)
           
 void startElement(String elementName, Attributes atts)
           
protected  void write(char c)
           
protected  void write(String s)
           
protected  void writeAttributes(Attributes atts)
           
protected  void writeCDATAEsc(char[] ch, int start, int length)
           
protected  void writeEsc(char[] ch, int start, int length, boolean isAttVal)
           
protected  void writeName(String elementName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEEN_NOTHING

protected static final Object SEEN_NOTHING

SEEN_ELEMENT

protected static final Object SEEN_ELEMENT

SEEN_DATA

protected static final Object SEEN_DATA

elementLevel

protected int elementLevel

output

protected Writer output

EMPTY_ATTS

protected final Attributes EMPTY_ATTS

state

protected Object state

stateStack

protected Stack<Object> stateStack

indentStep

protected int indentStep

depth

protected int depth
Constructor Detail

XMLWriter

public XMLWriter(Writer writer)
Method Detail

reset

public void reset()

flush

public void flush()
           throws IOException
Throws:
IOException

setOutput

public void setOutput(Writer writer)

getOutput

public Writer getOutput()

startDocument

public void startDocument()
                   throws SAXException
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Throws:
SAXException

startElement

public void startElement(String elementName,
                         Attributes atts)
                  throws SAXException
Throws:
SAXException

endElement

public void endElement(String elementName)
                throws SAXException
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int len)
                throws SAXException
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Throws:
SAXException

dataElement

public void dataElement(String elementName,
                        Attributes atts)
                 throws SAXException
Throws:
SAXException

startElement

public void startElement(String localName)
                  throws SAXException
Throws:
SAXException

dataElement

public void dataElement(String elementName,
                        Attributes atts,
                        String content)
                 throws SAXException
Throws:
SAXException

characters

public void characters(String data)
                throws SAXException
Throws:
SAXException

getIndentStep

public int getIndentStep()

setIndentStep

public void setIndentStep(int indentStep)

setDepth

public void setDepth(int depth)

cdata

public void cdata(String s)
           throws SAXException
Throws:
SAXException

init

protected void init(Writer writer)

write

protected void write(char c)
              throws SAXException
Throws:
SAXException

write

protected void write(String s)
              throws SAXException
Throws:
SAXException

writeAttributes

protected void writeAttributes(Attributes atts)
                        throws SAXException
Throws:
SAXException

writeEsc

protected void writeEsc(char[] ch,
                        int start,
                        int length,
                        boolean isAttVal)
                 throws SAXException
Throws:
SAXException

writeCDATAEsc

protected void writeCDATAEsc(char[] ch,
                             int start,
                             int length)
                      throws SAXException
Throws:
SAXException

writeName

protected void writeName(String elementName)
                  throws SAXException
Throws:
SAXException

doIndent

protected void doIndent()
                 throws SAXException
Throws:
SAXException

close

public void close()
           throws IOException
Throws:
IOException


Copyright © 2012. All Rights Reserved.