org.apache.shindig.protocol.conversion
Class BeanAtomConverter

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

public class BeanAtomConverter
extends Object
implements BeanConverter

Converts a Bean into Atom-like syntax.


Field Summary
static String ERROR_MESSAGE_FMT
           
 
Constructor Summary
BeanAtomConverter()
           
 
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
 

Field Detail

ERROR_MESSAGE_FMT

public static final String ERROR_MESSAGE_FMT
See Also:
Constant Field Values
Constructor Detail

BeanAtomConverter

public BeanAtomConverter()
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.