org.apache.xmlrpc
Class XmlRpc.XmlWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.OutputStreamWriter
              |
              +--org.apache.xmlrpc.XmlRpc.XmlWriter
Enclosing class:
XmlRpc

class XmlRpc.XmlWriter
extends java.io.OutputStreamWriter

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
           
protected static java.lang.String GREATER_THAN_ENTITY
           
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
           
 
Fields inherited from class java.io.OutputStreamWriter
bb, ctb, defaultByteBufferSize, nBytes, nextByte, out
 
Fields inherited from class java.io.Writer
lock, writeBuffer, writeBufferSize
 
Constructor Summary
XmlRpc.XmlWriter(java.io.OutputStream out)
           
XmlRpc.XmlWriter(java.io.OutputStream out, java.lang.String enc)
           
 
Method Summary
protected  void chardata(java.lang.String text)
           
protected  void emptyElement(java.lang.String elem)
           
protected  void endElement(java.lang.String elem)
           
protected  void startElement(java.lang.String elem)
           
 void writeObject(java.lang.Object obj)
          Writes the XML representation of a supported Java object type.
 
Methods inherited from class java.io.OutputStreamWriter
close, ensureOpen, flush, flushBuffer, 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, registerNatives, toString, wait, wait, wait
 

Field Detail

PROLOG_START

protected static final java.lang.String PROLOG_START

PROLOG_END

protected static final java.lang.String PROLOG_END

CLOSING_TAG_START

protected static final java.lang.String CLOSING_TAG_START

SINGLE_TAG_END

protected static final java.lang.String SINGLE_TAG_END

LESS_THAN_ENTITY

protected static final java.lang.String LESS_THAN_ENTITY

GREATER_THAN_ENTITY

protected static final java.lang.String GREATER_THAN_ENTITY

AMPERSAND_ENTITY

protected static final java.lang.String AMPERSAND_ENTITY
Constructor Detail

XmlRpc.XmlWriter

public XmlRpc.XmlWriter(java.io.OutputStream out)
                 throws java.io.UnsupportedEncodingException,
                        java.io.IOException

XmlRpc.XmlWriter

public XmlRpc.XmlWriter(java.io.OutputStream out,
                        java.lang.String enc)
                 throws java.io.UnsupportedEncodingException,
                        java.io.IOException
Method Detail

writeObject

public void writeObject(java.lang.Object obj)
                 throws java.io.IOException
Writes the XML representation of a supported Java object type.
Parameters:
obj - The Object to write.

startElement

protected void startElement(java.lang.String elem)
                     throws java.io.IOException

endElement

protected void endElement(java.lang.String elem)
                   throws java.io.IOException

emptyElement

protected void emptyElement(java.lang.String elem)
                     throws java.io.IOException

chardata

protected void chardata(java.lang.String text)
                 throws java.io.IOException


Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.