Java Float Number Create toFloat(byte[] b)

Here you can find the source of toFloat(byte[] b)

Description

to Float

License

Apache License

Declaration

public static float toFloat(byte[] b) 

Method Source Code

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

public class Main {
    public static float toFloat(byte[] b) {
        int l;/*w  w  w  .j  a v a  2  s.c o  m*/
        l = b[0];
        l &= 0xff;
        l |= ((long) b[1] << 8);
        l &= 0xffff;
        l |= ((long) b[2] << 16);
        l &= 0xffffff;
        l |= ((long) b[3] << 24);
        return Float.intBitsToFloat(l);
    }
}

Related

  1. toFloat(byte[] arr)
  2. toFloat(byte[] b)
  3. toFloat(byte[] b, int off, boolean bigEndian)
  4. toFloat(byte[] byteArray)
  5. toFloat(byte[] bytes)
  6. toFloat(byte[] bytes)