public final class BigDecimalSerializer
extends java.lang.Object
Serialize BigDecimal classes to/from DataInput and DataOutput objects.
BigDecimal is comprised of a BigInteger with an integer 'scale' field.
The BigDecimal/BigInteger can also return itself as a 'long' value.
We serialize in one of two formats:
First, check whether the BigInt can fit in a long:
boolean b = BigIntegerPart > LONG_MAX || BigIntegerPart < LONG_MIN
[int: scale][boolean: b == false][long: BigInt-part]
[int: scale][boolean: b == true][string: BigInt-part.toString()]
TODO(aaron): Get this to work with Hadoop's Serializations framework.