text: public double readDouble() {long valueLongBits = readLong();double result = Double.longBitsToDouble(valueLongBits);if (Double.isNaN(result)) {throw new RuntimeException("Did not expect to read NaN");}return result;}