code: public static int writeDouble(byte[] array, int offset, double v) {
      return writeLong(array, offset, Double.doubleToLongBits(v));
    }
docs: Write a double to the byte array at the given offset.
  
  @param array Array to write to
  @param offset Offset to write to
  @param v data
  @return number of bytes written