|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.util.xml.XMLStreamWriter
public class XMLStreamWriter
A writer, which write xml-elements, attributes and so on to an output stream.
only xml version 1.0
| Constructor Summary | |
|---|---|
XMLStreamWriter(java.io.OutputStream sout,
java.lang.String enc)
Create a new object. |
|
| Method Summary | |
|---|---|
void |
close()
Close the output. |
void |
flush()
Flush the buffer to the output. |
java.lang.String |
getDefaultNamespace()
Returns the default namespace. |
boolean |
isRemoveWhiteSpace()
Getter for removeWhiteSpace. |
void |
newLine()
Write a newline to the output. |
void |
setBeauty(boolean b)
Set the beauty. |
void |
setDefaultNamespace(java.lang.String ns)
Set the default name space for elements. |
void |
setDocType(java.lang.String rootn,
java.lang.String publicId,
java.lang.String systemId)
Set the doctpye definition. |
void |
setIndent(java.lang.String i)
Set the indent. |
void |
setNumberformat(java.text.NumberFormat nformat)
Setter for number format. |
void |
setRemoveWhiteSpace(boolean removeWhiteSpace)
Setter for removeWhiteSpace. |
void |
writeAttribute(java.lang.String name,
boolean value)
Write a attribute to the element. |
void |
writeAttribute(java.lang.String name,
double value)
Write a attribute to the element. |
void |
writeAttribute(java.lang.String name,
long value)
Write a attribute to the element. |
void |
writeAttribute(java.lang.String name,
long value,
int length)
Write a attribute to the element. |
void |
writeAttribute(java.lang.String name,
java.lang.Object value)
Write a attribute to the element. |
void |
writeAttribute(java.lang.String name,
java.lang.String value)
Write a attribute to the element. |
void |
writeAttribute(java.lang.String ns,
java.lang.String name,
java.lang.String value)
Write a attribute (with name space) to the element. |
void |
writeByteArray(byte[] bytes)
Write a byte array with hex values to the output. |
void |
writeByteArrayAsEntries(byte[] bytes)
Write a byte array as entries (hex). |
void |
writeCDATA(byte[] array)
Write a CDATA string. |
void |
writeCDATA(java.lang.String text)
Write a cdata string. |
void |
writeCharacters(char[] ch,
int start,
int length)
Write characters to the output. |
void |
writeCharacters(java.lang.String text)
Write characters to the output. |
void |
writeComment(java.lang.String text)
Write a comment. |
void |
writeEndDocument()
Write the end of the document. |
void |
writeEndElement()
Write the end element to the output. |
void |
writeFormatAttribute(java.lang.String name,
double value)
Write a attribute to the element and use the formatter. |
void |
writeIntArrayAsEntries(int[] array)
Write a int array as entries (hex). |
void |
writeShortArray(short[] shorts)
Write a short array with hex values to the output. |
void |
writeStartDocument()
Write the start of the document. |
void |
writeStartElement(java.lang.String element)
Write the start element to the output. |
void |
writeStartElement(java.lang.String ns,
java.lang.String element)
Write the start element to the output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLStreamWriter(java.io.OutputStream sout,
java.lang.String enc)
throws java.io.IOException
sout - The output.enc - The encoding
java.io.IOException - if an error occurs.| Method Detail |
|---|
public void close()
throws java.io.IOException
java.io.IOException - if an error occurs.
public void flush()
throws java.io.IOException
java.io.IOException - if an error occurs.public java.lang.String getDefaultNamespace()
public boolean isRemoveWhiteSpace()
public void newLine()
throws java.io.IOException
java.io.IOException - if an error occurs.
public void setBeauty(boolean b)
throws java.io.IOException
b - The beauty to set.
java.io.IOException - if an error occurs.
public void setDefaultNamespace(java.lang.String ns)
throws java.io.IOException
ns - The default name space to set.
java.io.IOException - if an error occurs.
public void setDocType(java.lang.String rootn,
java.lang.String publicId,
java.lang.String systemId)
throws java.io.IOException
rootn - The root element.publicId - The public id.systemId - The system id.
java.io.IOException - if an IO-error occurred.
public void setIndent(java.lang.String i)
throws java.io.IOException
i - The indent to set.
java.io.IOException - if an error occurs.public void setNumberformat(java.text.NumberFormat nformat)
nformat - The number format to set.public void setRemoveWhiteSpace(boolean removeWhiteSpace)
removeWhiteSpace - the removeWhiteSpace to set
public void writeAttribute(java.lang.String name,
boolean value)
throws java.io.IOException
name - The name of the attribute.value - The value of the attribute.
java.io.IOException - if an error occurs.
public void writeAttribute(java.lang.String name,
double value)
throws java.io.IOException
name - The name of the attribute.value - The value of the attribute.
java.io.IOException - if an error occurs.
public void writeAttribute(java.lang.String name,
long value)
throws java.io.IOException
name - The name of the attribute.value - The value of the attribute.
java.io.IOException - if an error occurs.
public void writeAttribute(java.lang.String name,
long value,
int length)
throws java.io.IOException
name - The name of the attribute.value - The value of the attribute.length - The length of the hex string.
java.io.IOException - if an error occurs.
public void writeAttribute(java.lang.String name,
java.lang.Object value)
throws java.io.IOException
name - The name of the attribute.value - The value of the attribute.
java.io.IOException - if an error occurs.
public void writeAttribute(java.lang.String name,
java.lang.String value)
throws java.io.IOException
name - The name of the attribute.value - The value of the attribute.
java.io.IOException - if an error occurs.
public void writeAttribute(java.lang.String ns,
java.lang.String name,
java.lang.String value)
throws java.io.IOException
ns - The name space.name - The name of the attribute.value - The value of the attribute.
java.io.IOException - if an error occurs.
public void writeByteArray(byte[] bytes)
throws java.io.IOException
bytes - The byte array.
java.io.IOException - if an error occurs.
public void writeByteArrayAsEntries(byte[] bytes)
throws java.io.IOException
bytes - The byte array.
java.io.IOException - if an error occurs.
public void writeCDATA(byte[] array)
throws java.io.IOException
array - The CDATA as array.
java.io.IOException - if an error occurs.
public void writeCDATA(java.lang.String text)
throws java.io.IOException
text - The cdata string.
java.io.IOException - if an error occurs.
public void writeCharacters(char[] ch,
int start,
int length)
throws java.io.IOException
ch - The char array.start - The start position.length - The length.
java.io.IOException - if an error occurs.
public void writeCharacters(java.lang.String text)
throws java.io.IOException
text - The text
java.io.IOException - if an error occurs.
public void writeComment(java.lang.String text)
throws java.io.IOException
text - The comment.
java.io.IOException - if an error occurs.
public void writeEndDocument()
throws java.io.IOException
It makes a flush()
java.io.IOException - if an error occurs.
public void writeEndElement()
throws java.io.IOException
java.io.IOException - if an error occurs.
public void writeFormatAttribute(java.lang.String name,
double value)
throws java.io.IOException
name - The name of the attribute.value - The value of the attribute.
java.io.IOException - if an error occurs.
public void writeIntArrayAsEntries(int[] array)
throws java.io.IOException
array - The int array.
java.io.IOException - if an error occurs.
public void writeShortArray(short[] shorts)
throws java.io.IOException
shorts - The short array.
java.io.IOException - if an error occurs.
public void writeStartDocument()
throws java.io.IOException
A newline is write after the header, without attend the beauty-flag.
java.io.IOException - if an error occurs.
public void writeStartElement(java.lang.String element)
throws java.io.IOException
element - the element
java.io.IOException - if an error occurs.
public void writeStartElement(java.lang.String ns,
java.lang.String element)
throws java.io.IOException
ns - the name spaceelement - the element
java.io.IOException - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||