if (object == null) {
output.writeVarInt(NULL, true);
return;
}
BigDecimal value = (BigDecimal)object;
bigIntegerSerializer.write(kryo, output, value.unscaledValue());
output.writeInt(value.scale(), false);
}
public BigDecimal read (Kryo kryo, Input input, Class<BigDecimal> type) {
BigInteger unscaledValue = bigIntegerSerializer.read(kryo, input, null);