|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectinfo.aduna.xml.SAXWriter
public class SAXWriter
SAXWriter is a utility class that translates events sent to a SAX ContentHandler to a character stream send to a Writer. SAXWriter optionally supports indentation.
Fixme: usage of an SAXWriter on an OutputStream when the character data contains non-ASCII codes still needs to be tested!!!
| Field Summary | |
|---|---|
static boolean |
DEFAULT_INDENT
Indicates the default behaviour of an SAXWriter concerning indentation. |
static int |
INDENT_INCREASE
The number of spaces that together form an indentation unit. |
| Constructor Summary | |
|---|---|
SAXWriter(OutputStream stream)
Create a new SAXWriter for the specified OutputStream with the default indentation property. |
|
SAXWriter(OutputStream stream,
boolean indent)
Create a new SAXWriter for the specified OutputStream which optionally prints indentation. |
|
SAXWriter(Writer writer)
Create a new SAXWriter for the specified Writer with the default indentation settings. |
|
SAXWriter(Writer writer,
boolean indenting)
Create a new SAXWriter for the specified Writer which optionally prints indentation. |
|
| Method Summary | |
|---|---|
void |
characters(char[] buf,
int offset,
int len)
|
void |
endDocument()
|
void |
endElement(String uri,
String lName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
void |
ignorableWhitespace(char[] buf,
int offset,
int len)
|
void |
processingInstruction(String target,
String data)
|
void |
setDocumentLocator(Locator locator)
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String uri,
String lName,
String qName,
Attributes attrs)
Inherit comment. |
void |
startPrefixMapping(String prefix,
String uri)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEFAULT_INDENT
public static final int INDENT_INCREASE
| Constructor Detail |
|---|
public SAXWriter(Writer writer,
boolean indenting)
public SAXWriter(Writer writer)
public SAXWriter(OutputStream stream,
boolean indent)
throws IOException
IOException
public SAXWriter(OutputStream stream)
throws IOException
IOException| Method Detail |
|---|
public void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandler
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXException
public void startPrefixMapping(String prefix,
String uri)
startPrefixMapping in interface ContentHandlerpublic void endPrefixMapping(String prefix)
endPrefixMapping in interface ContentHandler
public void startElement(String uri,
String lName,
String qName,
Attributes attrs)
throws SAXException
startElement in interface ContentHandlerSAXException
public void endElement(String uri,
String lName,
String qName)
throws SAXException
endElement in interface ContentHandlerSAXException
public void characters(char[] buf,
int offset,
int len)
throws SAXException
characters in interface ContentHandlerSAXException
public void ignorableWhitespace(char[] buf,
int offset,
int len)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void skippedEntity(String name)
skippedEntity in interface ContentHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||