Top Description Fields Constructors Methods
org.joda.money

pack-priv final Class Ser

extends Object
implements Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable
Imports
java.io.Externalizable, .IOException, .InvalidClassException, .InvalidObjectException, .ObjectInput, .ObjectOutput, .StreamCorruptedException, java.math.BigDecimal, .BigInteger

A package scoped class used to manage serialization efficiently.

This class is mutable and intended for use by a single thread.

Field Summary

Modifier and TypeField and Description
pack-priv static final byte
BIG_MONEY

Type for BigMoney.

pack-priv static final byte
CURRENCY_UNIT

Type for CurrencyUnit.

pack-priv static final byte
MONEY

Type for Money.

private Object
object

The data object.

private byte
type

The type.

Constructor Summary

AccessConstructor and Description
public
Ser()

Constructor for serialization.

pack-priv
Ser(byte
the type
type
,
Object
the object
object
)

Constructor for package.

Method Summary

Modifier and TypeMethod and Description
private BigMoney
private CurrencyUnit
public void
readExternal(ObjectInput
the input stream
in
)

Implements java.io.Externalizable.readExternal.

Outputs the data.

private Object

Returns:

the read object, should never be null
readResolve
()

Returns the object that will replace this one.

private void
private void
public void
writeExternal(ObjectOutput
the output stream
out
)

Implements java.io.Externalizable.writeExternal.

Outputs the data.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BIG_MONEYback to summary
pack-priv static final byte BIG_MONEY

Type for BigMoney.

CURRENCY_UNITback to summary
pack-priv static final byte CURRENCY_UNIT

Type for CurrencyUnit.

MONEYback to summary
pack-priv static final byte MONEY

Type for Money.

objectback to summary
private Object object

The data object.

typeback to summary
private byte type

The type.

Constructor Detail

Serback to summary
public Ser()

Constructor for serialization.

Serback to summary
pack-priv Ser(byte type, Object object)

Constructor for package.

Parameters
type:byte

the type

object:Object

the object

Method Detail

readBigMoneyback to summary
private BigMoney readBigMoney(ObjectInput in) throws IOException
readCurrencyback to summary
private CurrencyUnit readCurrency(ObjectInput in) throws IOException
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Outputs the data.

Parameters
in:ObjectInput

the input stream

Annotations
@Override
Exceptions
IOException:
if an error occurs
ClassNotFoundException:

Doc from java.io.Externalizable.readExternal.

If the class for an object being restored cannot be found.

readResolveback to summary
private Object readResolve()

Returns the object that will replace this one.

Returns:Object

the read object, should never be null

writeBigMoneyback to summary
private void writeBigMoney(ObjectOutput out, BigMoney obj) throws IOException
writeCurrencyback to summary
private void writeCurrency(ObjectOutput out, CurrencyUnit obj) throws IOException
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Outputs the data.

Parameters
out:ObjectOutput

the output stream

Annotations
@Override
Exceptions
IOException:
if an error occurs
Serial data
One byte type code, then data specific to the type.