|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joda.beans.ser.JodaBeanSer
public final class JodaBeanSer
Provides the ability for a Joda-Bean to be serialized.
Serialization of Joda-Beans uses the information in the beans to optimize the size of the data output.
| Field Summary | |
|---|---|
static JodaBeanSer |
COMPACT
Obtains the singleton compact instance. |
static JodaBeanSer |
PRETTY
Obtains the singleton pretty-printing instance. |
| Method Summary | |
|---|---|
JodaBeanBinReader |
binReader()
Creates a binary reader. |
JodaBeanBinWriter |
binWriter()
Creates a binary writer. |
org.joda.convert.StringConvert |
getConverter()
Gets the string converter. |
SerDeserializers |
getDeserializers()
Gets the deserializers. |
String |
getIndent()
Gets the pretty print indent. |
SerIteratorFactory |
getIteratorFactory()
Gets the iterator factory. |
String |
getNewLine()
Gets the new line string. |
boolean |
isShortTypes()
Gets whether to use short types. |
JodaBeanJsonReader |
jsonReader()
Creates a JSON reader. |
JodaBeanJsonWriter |
jsonWriter()
Creates a JSON writer. |
JodaBeanSimpleJsonReader |
simpleJsonReader()
Creates a simple JSON reader. |
JodaBeanSimpleJsonWriter |
simpleJsonWriter()
Creates a simple JSON writer. |
String |
toString()
|
JodaBeanSer |
withConverter(org.joda.convert.StringConvert converter)
Returns a copy of this serializer with the specified string converter. |
JodaBeanSer |
withDeserializers(SerDeserializers deserializers)
Returns a copy of this serializer with the specified deserializers. |
JodaBeanSer |
withIndent(String indent)
Returns a copy of this serializer with the specified pretty print indent. |
JodaBeanSer |
withIteratorFactory(SerIteratorFactory iteratorFactory)
Returns a copy of this serializer with the specified iterator factory. |
JodaBeanSer |
withNewLine(String newLine)
Returns a copy of this serializer with the specified pretty print new line. |
JodaBeanSer |
withShortTypes(boolean shortTypes)
Returns a copy of this serializer with the short types flag set. |
JodaBeanXmlReader |
xmlReader()
Creates an XML reader. |
JodaBeanXmlWriter |
xmlWriter()
Creates an XML writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final JodaBeanSer COMPACT
public static final JodaBeanSer PRETTY
| Method Detail |
|---|
public String getIndent()
public JodaBeanSer withIndent(String indent)
indent - the indent, not null
public String getNewLine()
public JodaBeanSer withNewLine(String newLine)
newLine - the new line, not null
public org.joda.convert.StringConvert getConverter()
The default converter can be modified.
public JodaBeanSer withConverter(org.joda.convert.StringConvert converter)
The default converter can be modified.
converter - the converter, not null
public SerIteratorFactory getIteratorFactory()
public JodaBeanSer withIteratorFactory(SerIteratorFactory iteratorFactory)
iteratorFactory - the iterator factory, not null
public boolean isShortTypes()
public JodaBeanSer withShortTypes(boolean shortTypes)
shortTypes - whether to use short types, not null
public SerDeserializers getDeserializers()
The default deserializers can be modified.
public JodaBeanSer withDeserializers(SerDeserializers deserializers)
The default deserializers can be modified.
deserializers - the deserializers, not null
public JodaBeanBinWriter binWriter()
A new instance of the writer must be created for each message.
public JodaBeanBinReader binReader()
A new instance of the reader must be created for each message.
public JodaBeanXmlWriter xmlWriter()
A new instance of the writer must be created for each message.
public JodaBeanXmlReader xmlReader()
A new instance of the reader must be created for each message.
public JodaBeanJsonWriter jsonWriter()
A new instance of the writer must be created for each message.
public JodaBeanJsonReader jsonReader()
A new instance of the reader must be created for each message.
public JodaBeanSimpleJsonWriter simpleJsonWriter()
A new instance of the writer must be created for each message. The simple writer omits all metadata. It is suitable for simple beans as often found in data-transfer protocols.
Not all beans can be used with the simple JSON writer as no type information is written.
If a bean has subclasses, or the declared type of a property or collection is
Object, then the JSON will not round trip. Where the type cannot be determined,
the reader will return Boolean, Integer, Double, String,
ArrayList or string keyed HashMap.
Maps must have keys that can be written as a string.
public JodaBeanSimpleJsonReader simpleJsonReader()
A new instance of the reader must be created for each message.
The simple reader is designed to operate with the simple writer.
It will not operate well with the output of jsonWriter().
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||