Here you can find the source of bitsToFloats(boolean[] b)
public static float[] bitsToFloats(boolean[] b)
//package com.java2s; /** Ben F Rayfield offers this software opensource MIT license */ public class Main { public static float[] bitsToFloats(boolean[] b) { float[] f = new float[b.length]; for (int i = 0; i < b.length; i++) { f[i] = b[i] ? 1 : 0;//from ww w.j av a 2 s .c om } return f; } }