/** * Convert this number to the equivalent Erlang external representation. * * @param buf * an output stream to which the encoded number should be * written. */ public override void encode(OtpOutputStream buf) { if (!BigIntegerIsNull(bigVal)) { buf.write_big_integer(bigVal); } else { buf.write_long(val); } }