Java Byte Array Little Endian bytesLittleToFloat(byte[] data, int start)

Here you can find the source of bytesLittleToFloat(byte[] data, int start)

Description

bytes Little To Float

License

Apache License

Declaration

public static float bytesLittleToFloat(byte[] data, int start) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static float bytesLittleToFloat(byte[] data, int start) {
        int ret = 0;
        ret = 0x000000ff & data[start + 0];
        ret |= (0x000000ff & data[start + 1]) << 8;
        ret |= (0x000000ff & data[start + 2]) << 16;
        ret |= (0x000000ff & data[start + 3]) << 24;

        return Float.intBitsToFloat(ret);
    }/*www .  j  a  va  2 s  . co  m*/
}

Related

  1. bytesLE2ushorts(byte[] b)
  2. BytesLEToFloat(final byte[] value)
  3. BytesLEToShort(final byte[] buf)
  4. bytesLittleToLong(byte[] data, int start)
  5. bytesLittleToShort(byte[] data, int start)