code: public static void writeDouble(double num, DataOutput out) throws IOException {
          writeLong(Double.doubleToLongBits(num), out);
      }
docs: Writes a double to an output stream
  @param num the double to be written
  @param out the output stream