code: public void writeBinary(PacketOutputStream pos) throws IOException {
      String value = bigDecimal.toPlainString();
      pos.writeFieldLength(value.length());
      pos.write(value);
    }
docs: Write data to socket in binary format.
  
  @param pos socket output stream
  @throws IOException if socket error occur