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.Externalizable
A 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 byte
BIG_MONEY
Type for BigMoney.(package private) static byte
CURRENCY_UNIT
Type for CurrencyUnit.(package private) static byte
MONEY
Type for Money.private java.lang.Object
object
The data object.private byte
type
The type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private BigMoney
readBigMoney(java.io.ObjectInput in)
private CurrencyUnit
readCurrency(java.io.ObjectInput in)
void
readExternal(java.io.ObjectInput in)
Outputs the data.private java.lang.Object
readResolve()
Returns the object that will replace this one.private void
writeBigMoney(java.io.ObjectOutput out, BigMoney obj)
private void
writeCurrency(java.io.ObjectOutput out, CurrencyUnit obj)
void
writeExternal(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.IOException
Outputs the data.- Specified by:
writeExternal
in 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.ClassNotFoundException
Outputs the data.- Specified by:
readExternal
in 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
-
-