|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.OutputStreamWriter
org.apache.xmlrpc.XmlWriter
A quick and dirty XML writer. If you feed it a
ByteArrayInputStream
, it may be necessary to call
writer.flush()
before calling
buffer.toByteArray()
to get the data written to
your byte buffer.
Field Summary | |
protected static java.lang.String |
AMPERSAND_ENTITY
|
protected static java.lang.String |
CLOSING_TAG_START
|
private static DateTool |
dateTool
Thread-safe wrapper for the DateFormat object used
to parse date/time values. |
private static java.util.Properties |
encodings
Mapping between Java encoding names and "real" names used in XML prolog. |
protected static java.lang.String |
GREATER_THAN_ENTITY
|
protected static java.lang.String |
ISO8859_1
Java's name for the the ISO8859_1 encoding. |
protected static java.lang.String |
LESS_THAN_ENTITY
|
protected static java.lang.String |
PROLOG_END
|
protected static java.lang.String |
PROLOG_START
|
protected static java.lang.String |
SINGLE_TAG_END
|
protected static java.lang.String |
UTF8
Java's name for the the UTF8 encoding. |
Fields inherited from class java.io.OutputStreamWriter |
|
Fields inherited from class java.io.Writer |
lock |
Constructor Summary | |
XmlWriter(java.io.OutputStream out,
java.lang.String enc)
Creates a new instance. |
Method Summary | |
protected static java.lang.String |
canonicalizeEncoding(java.lang.String javaEncoding)
Tranforms a Java encoding to the canonical XML form (if a mapping is available). |
protected void |
chardata(java.lang.String text)
Writes text as PCDATA . |
protected void |
emptyElement(java.lang.String elem)
|
protected void |
endElement(java.lang.String elem)
|
protected void |
startElement(java.lang.String elem)
|
protected void |
write(byte[] byteData)
This is used to write out the Base64 output... |
void |
writeObject(java.lang.Object obj)
Writes the XML representation of a supported Java object type. |
Methods inherited from class java.io.OutputStreamWriter |
close, flush, getEncoding, write, write, write |
Methods inherited from class java.io.Writer |
write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String PROLOG_START
protected static final java.lang.String PROLOG_END
protected static final java.lang.String CLOSING_TAG_START
protected static final java.lang.String SINGLE_TAG_END
protected static final java.lang.String LESS_THAN_ENTITY
protected static final java.lang.String GREATER_THAN_ENTITY
protected static final java.lang.String AMPERSAND_ENTITY
protected static final java.lang.String ISO8859_1
protected static final java.lang.String UTF8
private static java.util.Properties encodings
private static DateTool dateTool
DateFormat
object used
to parse date/time values.
Constructor Detail |
public XmlWriter(java.io.OutputStream out, java.lang.String enc) throws java.io.UnsupportedEncodingException, java.io.IOException
out
- The stream to write output to.enc
- The encoding to using for outputing XML.
java.io.UnsupportedEncodingException
- Encoding unrecognized.
java.io.IOException
- Problem writing.Method Detail |
protected static java.lang.String canonicalizeEncoding(java.lang.String javaEncoding)
javaEncoding
- The name of the encoding as known by Java.
public void writeObject(java.lang.Object obj) throws XmlRpcException, java.io.IOException
obj
- The Object
to write.
XmlRpcException
- Unsupported character data found.
java.io.IOException
- Problem writing data.
java.lang.IllegalArgumentException
- If a null
parameter is passed to this method (not supported by the XML-RPC specification).protected void write(byte[] byteData) throws java.io.IOException
java.io.IOException
protected void startElement(java.lang.String elem) throws java.io.IOException
elem
-
java.io.IOException
protected void endElement(java.lang.String elem) throws java.io.IOException
elem
-
java.io.IOException
protected void emptyElement(java.lang.String elem) throws java.io.IOException
elem
-
java.io.IOException
protected void chardata(java.lang.String text) throws XmlRpcException, java.io.IOException
PCDATA
.
text
- The data to write.
XmlRpcException
- Unsupported character data found.
java.io.IOException
- Problem writing data.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |