code: @Override
      public void encode(final OtpOutputStream buf) {
          if (bigVal != null) {
              buf.write_big_integer(bigVal);
          } else {
              buf.write_long(val);
          }
      }
docs: Convert this number to the equivalent Erlang external representation.
  
  @param buf
  an output stream to which the encoded number should be
  written.