Package org.joda.money
Class Ser
- java.lang.Object
-
- org.joda.money.Ser
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
final class Ser extends java.lang.Object implements java.io.ExternalizableA package scoped class used to manage serialization efficiently.This class is mutable and intended for use by a single thread.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static byteBIG_MONEYType for BigMoney.(package private) static byteCURRENCY_UNITType for CurrencyUnit.(package private) static byteMONEYType for Money.private java.lang.ObjectobjectThe data object.private bytetypeThe type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private BigMoneyreadBigMoney(java.io.ObjectInput in)private CurrencyUnitreadCurrency(java.io.ObjectInput in)voidreadExternal(java.io.ObjectInput in)Outputs the data.private java.lang.ObjectreadResolve()Returns the object that will replace this one.private voidwriteBigMoney(java.io.ObjectOutput out, BigMoney obj)private voidwriteCurrency(java.io.ObjectOutput out, CurrencyUnit obj)voidwriteExternal(java.io.ObjectOutput out)Outputs the data.
-
-
-
Field Detail
-
BIG_MONEY
static final byte BIG_MONEY
Type for BigMoney.- See Also:
- Constant Field Values
-
MONEY
static final byte MONEY
Type for Money.- See Also:
- Constant Field Values
-
CURRENCY_UNIT
static final byte CURRENCY_UNIT
Type for CurrencyUnit.- See Also:
- Constant Field Values
-
type
private byte type
The type.
-
object
private java.lang.Object object
The data object.
-
-
Method Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionOutputs the data.- Specified by:
writeExternalin interfacejava.io.Externalizable- Parameters:
out- the output stream- Throws:
java.io.IOException- if an error occurs
-
writeBigMoney
private void writeBigMoney(java.io.ObjectOutput out, BigMoney obj) throws java.io.IOException- Throws:
java.io.IOException
-
writeCurrency
private void writeCurrency(java.io.ObjectOutput out, CurrencyUnit obj) throws java.io.IOException- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionOutputs the data.- Specified by:
readExternalin interfacejava.io.Externalizable- Parameters:
in- the input stream- Throws:
java.io.IOException- if an error occursjava.lang.ClassNotFoundException
-
readBigMoney
private BigMoney readBigMoney(java.io.ObjectInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readCurrency
private CurrencyUnit readCurrency(java.io.ObjectInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
readResolve
private java.lang.Object readResolve()
Returns the object that will replace this one.- Returns:
- the read object, should never be null
-
-