public class WriteTags
extends java.lang.Object
| Constructor and Description |
|---|
WriteTags(java.io.OutputStream output)
Construct an object to write tags.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add an attribute to be written with the next tag.
|
void |
addCDATA(java.lang.String text)
Add CDATA to the output stream.
|
void |
addProperty(java.lang.String name,
double d)
Add a property as a double.
|
void |
addProperty(java.lang.String name,
double[] array,
int len)
Write an array as a property.
|
void |
addProperty(java.lang.String name,
int i)
Add a property as an integer.
|
void |
addProperty(java.lang.String name,
int[] array,
int len)
Write an array as a property.
|
void |
addProperty(java.lang.String name,
java.lang.String str)
Add a property as a string.
|
void |
addText(java.lang.String text)
Add text.
|
void |
beginDocument()
Called to begin the document.
|
void |
beginTag(java.lang.String name)
Begin a tag with the specified name.
|
void |
close()
Close this object.
|
void |
endDocument()
End the document.
|
void |
endTag()
End the current tag.
|
void |
endTag(java.lang.String name)
End a tag, require that we are ending the specified tag.
|
public WriteTags(java.io.OutputStream output)
output - THe output stream.public void addAttribute(java.lang.String name,
java.lang.String value)
name - The name of the attribute.value - The value of the attribute.public void addCDATA(java.lang.String text)
text - The text to add.public void addProperty(java.lang.String name,
double d)
name - The name of the enclosing tags.d - The value to store.public void addProperty(java.lang.String name,
int i)
name - The name of the enclosing tags.i - The value to store.public void addProperty(java.lang.String name,
java.lang.String str)
name - The name of the enclosing tags.str - The value to store.public void addProperty(java.lang.String name,
double[] array,
int len)
name - The name of the property.array - The array to write.len - The length of the array to write.public void addProperty(java.lang.String name,
int[] array,
int len)
name - The name of the property.array - The array to write.len - The length of the array to write.public void addText(java.lang.String text)
text - The text to add.public void beginDocument()
public void beginTag(java.lang.String name)
name - The tag to begin.public void close()
public void endDocument()
public void endTag()
public void endTag(java.lang.String name)
name - The tag to be ending.