org.apache.shindig.protocol.conversion
Class BeanXmlConverter

java.lang.Object
  extended by org.apache.shindig.protocol.conversion.BeanXmlConverter
All Implemented Interfaces:
BeanConverter

public class BeanXmlConverter
extends Object
implements BeanConverter

Converts to/from XML format using betwixt


Constructor Summary
BeanXmlConverter()
           
 
Method Summary
 void append(Appendable buf, Object pojo)
          Serialize object to a buffer.
<T> T
convertToObject(String xml, Class<T> className)
           
 String convertToString(Object pojo)
           
 String convertToXml(Object obj)
           
 String getContentType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanXmlConverter

public BeanXmlConverter()
Method Detail

getContentType

public String getContentType()
Specified by:
getContentType in interface BeanConverter
Returns:
the content type of the converted data

convertToString

public String convertToString(Object pojo)
Specified by:
convertToString in interface BeanConverter

convertToXml

public String convertToXml(Object obj)

convertToObject

public <T> T convertToObject(String xml,
                             Class<T> className)
Specified by:
convertToObject in interface BeanConverter

append

public void append(Appendable buf,
                   Object pojo)
            throws IOException
Description copied from interface: BeanConverter
Serialize object to a buffer. Useful for high performance output.

Specified by:
append in interface BeanConverter
Parameters:
buf - Buffer to append to
pojo - Object to serialize
Throws:
IOException - If Appendable.append(char) throws an exception.


Copyright © 2007-2012. All Rights Reserved.