Here you can find the source of floatToByte(float[] values)
public static byte[] floatToByte(float[] values)
//package com.java2s; public class Main { public static byte[] floatToByte(float[] values) { if (values == null) { return null; }/*from w ww. j a v a 2 s. c o m*/ byte[] results = new byte[values.length]; for (int i = 0; i < values.length; i++) { results[i] = (byte) values[i]; } return results; } }