The list of methods to do Float to Byte Array are organized into topic(s).
byte[]
floatToByte(float[] values) float To Byte
if (values == null) {
return null;
byte[] results = new byte[values.length];
for (int i = 0; i < values.length; i++) {
results[i] = (byte) values[i];
return results;
...
byte[]
floatToByteArray(float number) float to byte array
byte[] byteArray = new byte[4];
Integer intBits = Float.floatToIntBits(number);
for (int i = 0; i < byteArray.length; i++) {
byteArray[i] = new Integer(intBits).byteValue();
intBits = intBits >> 8;
return byteArray;
byte[]
floatToBytes(float theFloat) Converts a float into an array of bytes Byte order: big endian
byte[] ret = new byte[4];
int floatAsInt = Float.floatToIntBits(theFloat);
ret[0] = (byte) ((floatAsInt >>> 24) & BYTESIZE);
ret[1] = (byte) ((floatAsInt >>> 16) & BYTESIZE);
ret[2] = (byte) ((floatAsInt >>> 8) & BYTESIZE);
ret[3] = (byte) ((floatAsInt) & BYTESIZE);
return ret;