|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer com.openharbor.beck.write.XMLWriter com.openharbor.beck.write.FastXMLWriter
Output XML without line breaks or indentation (making it compact and fast to parse).
Nested Class Summary |
Nested classes inherited from class com.openharbor.beck.write.XMLWriter |
XMLWriter.MapKey |
Field Summary | |
protected static int |
ATTRIBUTE
writing attributes |
protected java.io.Writer |
attributeWriter
writes PCDATA, replacing XML reserved characters with entity references. |
protected static int |
CONTENT
writing content |
protected java.io.Writer |
contentWriter
|
protected static int |
END
wrote closing tag |
protected java.io.Writer |
out
XML output stream |
protected static int |
START
wrote start of opening tag |
protected int |
state
current state |
Fields inherited from class com.openharbor.beck.write.XMLWriter |
CYCLES, DECLARED_NAMESPACES, ELEMENT_NAME, prefixer, SOURCE, TEXT_IS_SIGNIFICANT, XSI, XSI_TYPE |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary | |
FastXMLWriter(java.io.Writer out)
Note that the XML is written to a character (not byte) stream. |
Method Summary | |
void |
attribute(XMLName name,
java.lang.String value)
Add an attribute to the current element. |
protected void |
beginContent()
|
protected java.lang.String |
choosePrefix(java.lang.String namespace,
java.util.Map declared)
|
void |
close()
|
protected void |
declareNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
|
void |
documentType(java.lang.String name,
java.lang.String publicId,
java.lang.String systemId)
Write <!DOCTYPE sax... |
void |
endElement()
|
void |
flush()
|
protected void |
startElement(XMLName name)
|
void |
write(char[] content,
int off,
int len)
Add text content to the current element. |
void |
write(int content)
|
void |
write(java.lang.String content)
|
void |
write(java.lang.String content,
int off,
int len)
|
void |
xmlHeader(java.lang.String encoding)
Write <?xml version="1.0" sax... |
Methods inherited from class com.openharbor.beck.write.XMLWriter |
attributes, getDocumentState, getElementStack, getElementStackTop, namespace, namespace, newMapKey, prefixToNamespace, resolveNamespace, setDocumentState, startElement |
Methods inherited from class java.io.Writer |
write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int START
protected static final int ATTRIBUTE
protected static final int CONTENT
protected static final int END
protected int state
protected java.io.Writer out
protected java.io.Writer attributeWriter
protected java.io.Writer contentWriter
Constructor Detail |
public FastXMLWriter(java.io.Writer out)
out
- whither XML will be writtenMethod Detail |
public void xmlHeader(java.lang.String encoding) throws java.io.IOException
java.io.IOException
public void documentType(java.lang.String name, java.lang.String publicId, java.lang.String systemId) throws java.io.IOException
name
- document type namepublicId
- public ID, or null to omit the public ID declaration.
java.io.IOException
protected void startElement(XMLName name) throws java.io.IOException
startElement
in class XMLWriter
java.io.IOException
protected void declareNamespace(java.lang.String prefix, java.lang.String namespaceURI) throws java.io.IOException
declareNamespace
in class XMLWriter
java.io.IOException
protected java.lang.String choosePrefix(java.lang.String namespace, java.util.Map declared) throws java.io.IOException
choosePrefix
in class XMLWriter
java.io.IOException
public void attribute(XMLName name, java.lang.String value) throws java.io.IOException
XMLWriter
attribute
in class XMLWriter
java.io.IOException
- if text or sub-elements have already been written in this element.public void endElement() throws java.io.IOException
endElement
in class XMLWriter
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public void write(java.lang.String content) throws java.io.IOException
write
in class XMLWriter
java.io.IOException
public void write(java.lang.String content, int off, int len) throws java.io.IOException
write
in class XMLWriter
java.io.IOException
public void write(char[] content, int off, int len) throws java.io.IOException
XMLWriter
write
in class XMLWriter
java.io.IOException
public void write(int content) throws java.io.IOException
java.io.IOException
protected void beginContent() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |