Class Ser
java.lang.Object
org.joda.money.Ser
- All Implemented Interfaces:
Externalizable, Serializable
A package scoped class used to manage serialization efficiently.
This class is mutable and intended for use by a single thread.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate BigMoneyprivate CurrencyUnitvoidOutputs the data.private ObjectReturns the object that will replace this one.private voidwriteBigMoney(ObjectOutput out, BigMoney obj) private voidwriteCurrency(ObjectOutput out, CurrencyUnit obj) voidOutputs the data.
-
Field Details
-
BIG_MONEY
static final byte BIG_MONEYType for BigMoney.- See Also:
-
MONEY
static final byte MONEYType for Money.- See Also:
-
CURRENCY_UNIT
static final byte CURRENCY_UNITType for CurrencyUnit.- See Also:
-
type
private byte typeThe type. -
object
The data object.
-
-
Constructor Details
-
Ser
public Ser()Constructor for serialization. -
Ser
Ser(byte type, Object object) Constructor for package.- Parameters:
type- the typeobject- the object
-
-
Method Details
-
writeExternal
Outputs the data.- Specified by:
writeExternalin interfaceExternalizable- Parameters:
out- the output stream- Throws:
IOException- if an error occurs
-
writeBigMoney
- Throws:
IOException
-
writeCurrency
- Throws:
IOException
-
readExternal
Outputs the data.- Specified by:
readExternalin interfaceExternalizable- Parameters:
in- the input stream- Throws:
IOException- if an error occursClassNotFoundException
-
readBigMoney
- Throws:
IOException
-
readCurrency
- Throws:
IOException
-
readResolve
Returns the object that will replace this one.- Returns:
- the read object, should never be null
-