public static Double readDouble(ByteBuffer buffer) { if (buffer != null) { return buffer.getDouble(); } else { return 0.0d; } }