public class ObjectCodecService extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ObjectCodecService.BooleanCodec |
static class |
ObjectCodecService.CalendarCodec |
static class |
ObjectCodecService.DateCodec |
static class |
ObjectCodecService.NumberCodec |
static class |
ObjectCodecService.StringCodec |
Constructor and Description |
---|
ObjectCodecService() |
Modifier and Type | Method and Description |
---|---|
void |
addCodec(ObjectCodec<?> codec) |
Map<Class<?>,ObjectCodec<?>> |
codecs() |
Map<String,ObjectCodec<?>> |
codecsByName() |
ObjectCodec<?> |
getCodec(Class<?> objectType) |
ObjectCodec<?> |
getCodec(String name) |
Collection<ObjectCodec<?>> |
getCodecs()
Get all codecs.
|
static void |
main(String[] args) |
Object |
read(InputStream in) |
Object |
read(InputStream in,
ClassLoader cl) |
Object |
read(org.codehaus.jackson.JsonParser jp,
ClassLoader cl) |
Object |
read(String json) |
Object |
read(String json,
ClassLoader cl) |
void |
removeCodec(Class<?> objectType) |
void |
removeCodec(String name) |
String |
toString(Object object) |
String |
toString(Object object,
boolean preetyPrint) |
void |
write(org.codehaus.jackson.JsonGenerator jg,
Object object) |
void |
write(OutputStream out,
Object object) |
void |
write(OutputStream out,
Object object,
boolean prettyPint) |
public Collection<ObjectCodec<?>> getCodecs()
public void addCodec(ObjectCodec<?> codec)
public void removeCodec(String name)
public void removeCodec(Class<?> objectType)
public ObjectCodec<?> getCodec(Class<?> objectType)
public ObjectCodec<?> getCodec(String name)
public Map<Class<?>,ObjectCodec<?>> codecs()
public Map<String,ObjectCodec<?>> codecsByName()
public String toString(Object object) throws IOException
IOException
public String toString(Object object, boolean preetyPrint) throws IOException
IOException
public void write(OutputStream out, Object object) throws IOException
IOException
public void write(OutputStream out, Object object, boolean prettyPint) throws IOException
IOException
public void write(org.codehaus.jackson.JsonGenerator jg, Object object) throws IOException
IOException
public Object read(String json) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(String json, ClassLoader cl) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(InputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(InputStream in, ClassLoader cl) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object read(org.codehaus.jackson.JsonParser jp, ClassLoader cl) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2011 Nuxeo SA. All Rights Reserved.