|
ePOST API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.p2p.util.XMLWriter
public class XMLWriter
XMLWriter is a utility class used by XMLObjectOutputStream to perform the actual XML writing. This writing is based on the XML Pull-Parsing API, available online at http://www.xmlpull.org. Any of the provided serializer implementations will work with this reader.
| Field Summary | |
|---|---|
protected org.xmlpull.v1.XmlSerializer |
serializer
The actual XML serializer, which does the writing |
protected java.io.Writer |
writer
The underlying writer which the serializer uses |
| Constructor Summary | |
|---|---|
XMLWriter(java.io.OutputStream out)
Constructor which takes the provided writer and builds a new XML writier to read XML from the writier. |
|
| Method Summary | |
|---|---|
void |
attribute(java.lang.String name,
boolean value)
Method which writes an attribute to the XML document. |
void |
attribute(java.lang.String name,
char value)
Method which writes an attribute to the XML document. |
void |
attribute(java.lang.String name,
double value)
Method which writes an attribute to the XML document. |
void |
attribute(java.lang.String name,
float value)
Method which writes an attribute to the XML document. |
void |
attribute(java.lang.String name,
int value)
Method which writes an attribute to the XML document. |
void |
attribute(java.lang.String name,
long value)
Method which writes an attribute to the XML document. |
void |
attribute(java.lang.String name,
java.lang.Object value)
Method which writes an attribute to the XML document. |
protected void |
attribute(java.lang.String name,
java.lang.String value)
Method which writes an attribute to the XML document. |
void |
close()
Method which flushes and closes the underlying writer, which will cause future writer attempts to throw an IOException. |
void |
end(java.lang.String name)
Method which ends the given tag name |
void |
flush()
Method which flushes all buffered data to the underlying writer |
void |
start(java.lang.String name)
Method which starts the given tag name |
void |
writeBase64(byte[] bytes,
int off,
int len)
Method which writes a sequence of base64 encoded bytes to the output stream |
void |
writeHeader()
Method which writes the XML header to the writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.xmlpull.v1.XmlSerializer serializer
protected java.io.Writer writer
| Constructor Detail |
|---|
public XMLWriter(java.io.OutputStream out)
throws java.io.IOException
out - The writer to base this XML writer off of
java.io.IOException - If an error occurs| Method Detail |
|---|
public void flush()
throws java.io.IOException
java.io.IOException - If an error occurs
public void close()
throws java.io.IOException
java.io.IOException - If an error occurs
public void writeBase64(byte[] bytes,
int off,
int len)
throws java.io.IOException
bytes - The bytes to write
java.io.IOException
public void writeHeader()
throws java.io.IOException
java.io.IOException - If an error occurs
public void attribute(java.lang.String name,
int value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
public void attribute(java.lang.String name,
double value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
public void attribute(java.lang.String name,
float value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
public void attribute(java.lang.String name,
long value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
public void attribute(java.lang.String name,
char value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
public void attribute(java.lang.String name,
boolean value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
public void attribute(java.lang.String name,
java.lang.Object value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
protected void attribute(java.lang.String name,
java.lang.String value)
throws java.io.IOException
name - The name of the attribute to writevalue - The value to write
java.io.IOException - If an error occurs
public void start(java.lang.String name)
throws java.io.IOException
name - The name of the tag to start
java.io.IOException - If an error occurs
public void end(java.lang.String name)
throws java.io.IOException
name - The name of the tag to end
java.io.IOException - If an error occurs
|
ePOST API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||