| 394 | } |
| 395 | |
| 396 | double getDouble() throws IOException { |
| 397 | int b0 = getByte(); |
| 398 | int b1 = getByte(); |
| 399 | int b2 = getByte(); |
| 400 | int b3 = getByte(); |
| 401 | int b4 = getByte(); |
| 402 | int b5 = getByte(); |
| 403 | int b6 = getByte(); |
| 404 | int b7 = getByte(); |
| 405 | long res = 0; |
| 406 | if (littleEndian) { |
| 407 | res += b0; |
| 408 | res += ( ((long)b1) << 8); |
| 409 | res += ( ((long)b2) << 16); |
| 410 | res += ( ((long)b3) << 24); |
| 411 | res += ( ((long)b4) << 32); |
| 412 | res += ( ((long)b5) << 40); |
| 413 | res += ( ((long)b6) << 48); |
| 414 | res += ( ((long)b7) << 56); |
| 415 | } else { |
| 416 | res += b7; |
| 417 | res += ( ((long)b6) << 8); |
| 418 | res += ( ((long)b5) << 16); |
| 419 | res += ( ((long)b4) << 24); |
| 420 | res += ( ((long)b3) << 32); |
| 421 | res += ( ((long)b2) << 40); |
| 422 | res += ( ((long)b1) << 48); |
| 423 | res += ( ((long)b0) << 56); |
| 424 | } |
| 425 | return Double.longBitsToDouble(res); |
| 426 | } |
| 427 | |
| 428 | float getFloat() throws IOException { |
| 429 | int b0 = getByte(); |