float getFloat() throws IOException { int b0 = getByte(); int b1 = getByte(); int b2 = getByte(); int b3 = getByte(); int res = 0; if (littleEndian) { res += b0; res += ( ((long)b1) << 8); res += ( ((long)b2) << 16); res += ( ((long)b3) << 24); } else { res += b3; res += ( ((long)b2) << 8); res += ( ((long)b1) << 16); res += ( ((long)b0) << 24); } return Float.intBitsToFloat(res); }
float getFloat() throws IOException { int b0 = getByte(); int b1 = getByte(); int b2 = getByte(); int b3 = getByte(); int res = 0; if (littleEndian) { res += b0; res += ( ((long)b1) << 8); res += ( ((long)b2) << 16); res += ( ((long)b3) << 24); } else { res += b3; res += ( ((long)b2) << 8); res += ( ((long)b1) << 16); res += ( ((long)b0) << 24); } return Float.intBitsToFloat(res); }
bytes[i] = getByte();
bytes[i] = getByte();