org.apache.abdera.ext.json
Class JSONWriter

java.lang.Object
  extended by org.apache.abdera.ext.json.JSONWriter
All Implemented Interfaces:
NamedWriter, Writer

public class JSONWriter
extends java.lang.Object
implements NamedWriter


Field Summary
static java.lang.String NAME
           
 
Fields inherited from interface org.apache.abdera.writer.Writer
INSTANCE
 
Constructor Summary
JSONWriter()
           
 
Method Summary
 java.lang.String getName()
           
static org.json.JSONObject toJSON(Entry entry)
           
static org.json.JSONObject toJSON(Feed feed)
           
static java.lang.Object toJSON(java.lang.Object object)
           
static org.json.JSONObject toJSON(Service service)
           
 java.lang.Object write(Base base)
           
 void writeTo(Base base, java.io.OutputStream out)
           
 void writeTo(Base base, java.io.Writer out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

JSONWriter

public JSONWriter()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface NamedWriter

write

public java.lang.Object write(Base base)
                       throws java.io.IOException
Specified by:
write in interface Writer
Throws:
java.io.IOException

writeTo

public void writeTo(Base base,
                    java.io.OutputStream out)
             throws java.io.IOException
Specified by:
writeTo in interface Writer
Throws:
java.io.IOException

writeTo

public void writeTo(Base base,
                    java.io.Writer out)
             throws java.io.IOException
Specified by:
writeTo in interface Writer
Throws:
java.io.IOException

toJSON

public static java.lang.Object toJSON(java.lang.Object object)
                               throws java.lang.Exception
Throws:
java.lang.Exception

toJSON

public static org.json.JSONObject toJSON(Entry entry)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

toJSON

public static org.json.JSONObject toJSON(Feed feed)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

toJSON

public static org.json.JSONObject toJSON(Service service)
                                  throws java.lang.Exception
Throws:
java.lang.Exception