public static byte[] convertToBytes(double n) {
        long bits = Double.doubleToLongBits(n);
        return convertToBytes(bits);
    }
Writes a double out to an OutputStream.

@param outputStream
           The OutputStream the double will be written to
@param value
           The double to write
@throws IOException
            Thrown if there is a problem writing to the OutputStream
jme3-core/src/plugins/java/com/jme3/export/binary/ByteUtils.java