org.joda.beans.ser
Class JodaBeanSer

java.lang.Object
  extended by org.joda.beans.ser.JodaBeanSer

public final class JodaBeanSer
extends Object

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.
 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

COMPACT

public static final JodaBeanSer COMPACT
Obtains the singleton compact instance.


PRETTY

public static final JodaBeanSer PRETTY
Obtains the singleton pretty-printing instance.

Method Detail

getIndent

public String getIndent()
Gets the pretty print indent.

Returns:
the indent, not null

withIndent

public JodaBeanSer withIndent(String indent)
Returns a copy of this serializer with the specified pretty print indent.

Parameters:
indent - the indent, not null
Returns:
a copy of this object with the indent changed, not null

getNewLine

public String getNewLine()
Gets the new line string.

Returns:
the newLine, not null

withNewLine

public JodaBeanSer withNewLine(String newLine)
Returns a copy of this serializer with the specified pretty print new line.

Parameters:
newLine - the new line, not null
Returns:
a copy of this object with the new line changed, not null

getConverter

public org.joda.convert.StringConvert getConverter()
Gets the string converter.

The default converter can be modified.

Returns:
the converter, not null

withConverter

public JodaBeanSer withConverter(org.joda.convert.StringConvert converter)
Returns a copy of this serializer with the specified string converter.

The default converter can be modified.

Parameters:
converter - the converter, not null
Returns:
a copy of this object with the converter changed, not null

getIteratorFactory

public SerIteratorFactory getIteratorFactory()
Gets the iterator factory.

Returns:
the iterator factory, not null

withIteratorFactory

public JodaBeanSer withIteratorFactory(SerIteratorFactory iteratorFactory)
Returns a copy of this serializer with the specified iterator factory.

Parameters:
iteratorFactory - the iterator factory, not null
Returns:
a copy of this object with the iterator factory changed, not null

isShortTypes

public boolean isShortTypes()
Gets whether to use short types.

Returns:
the short types flag, not null

withShortTypes

public JodaBeanSer withShortTypes(boolean shortTypes)
Returns a copy of this serializer with the short types flag set.

Parameters:
shortTypes - whether to use short types, not null
Returns:
a copy of this object with the short types flag changed, not null

getDeserializers

public SerDeserializers getDeserializers()
Gets the deserializers.

The default deserializers can be modified.

Returns:
the converter, not null

withDeserializers

public JodaBeanSer withDeserializers(SerDeserializers deserializers)
Returns a copy of this serializer with the specified deserializers.

The default deserializers can be modified.

Parameters:
deserializers - the deserializers, not null
Returns:
a copy of this object with the converter changed, not null

binWriter

public JodaBeanBinWriter binWriter()
Creates a binary writer.

Returns:
the binary writer, not null

binReader

public JodaBeanBinReader binReader()
Creates a binary reader.

Returns:
the binary reader, not null

xmlWriter

public JodaBeanXmlWriter xmlWriter()
Creates an XML writer.

Returns:
the XML writer, not null

xmlReader

public JodaBeanXmlReader xmlReader()
Creates an XML reader.

Returns:
the XML reader, not null

jsonWriter

public JodaBeanJsonWriter jsonWriter()
Creates a JSON writer.

Returns:
the JSON writer, not null

jsonReader

public JodaBeanJsonReader jsonReader()
Creates a JSON reader.

Returns:
the JSON reader, not null

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007–2014 Joda.org. All rights reserved.