private void writeInt32(DataOutputStream output, Integer i) throws IOException {
if(i == null)
output.writeInt(Integer.MIN_VALUE);
else if(i.intValue() == Integer.MIN_VALUE)
throw new SerializationException("Underflow: attempt to store " + Integer.MIN_VALUE
+ " in int32, but minimum value is "
+ (Integer.MIN_VALUE - 1) + ".");
else
output.writeInt(i.intValue());
}