X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjavajs%2Futil%2FBinaryDocument.java;h=73ec57b74421912d967dfd1346b3761e4d3cd8af;hb=5e556aaaedbcf56063c72677364c7fe2b961230d;hp=7ac5a56d7236c035bce9287ae3c6643b039f9515;hpb=507f8f9e119ce89ba04aea3b3d814cbe58f3d686;p=jalview.git diff --git a/src/javajs/util/BinaryDocument.java b/src/javajs/util/BinaryDocument.java index 7ac5a56..73ec57b 100644 --- a/src/javajs/util/BinaryDocument.java +++ b/src/javajs/util/BinaryDocument.java @@ -262,6 +262,7 @@ public class BinaryDocument extends BC implements GenericBinaryDocument { return intToFloat(readInt()); } + @SuppressWarnings("unused") @Override public double readDouble() throws IOException { /** @@ -270,14 +271,17 @@ public class BinaryDocument extends BC implements GenericBinaryDocument { * * @j2sNative * - * this.readByteArray(this.t8, 0, 8); - * return this.bytesToDoubleToFloat(this.t8, 0, this.isBigEndian); - * + * */ { nBytes += 8; - return (isBigEndian ? ioReadDouble() : Double.longBitsToDouble(readLELong())); + if (true) + return (isBigEndian ? ioReadDouble() + : Double.longBitsToDouble(readLELong())); } + // this is the JavaScript-only part + this.readByteArray(this.t8, 0, 8); + return bytesToDoubleToFloat(this.t8, 0, this.isBigEndian); } private double ioReadDouble() throws IOException {