Java Utililty Methods Float to Byte

List of utility methods to do Float to Byte

Description

The list of methods to do Float to Byte are organized into topic(s).

Method

byte[]floatToByte(float d)
float To Byte
byte[] bytes = new byte[4];
int l = Float.floatToIntBits(d);
for (int i = 0; i < bytes.length; i++) {
    bytes[i] = Integer.valueOf(l).byteValue();
    l = l >> 8;
return bytes;
byte[]floatToByte(Float f)
float To Byte
return String.valueOf(f).getBytes();
BytefloatToByte(float f)
float To Byte
if (f >= Byte.MIN_VALUE && f <= Byte.MAX_VALUE) {
    return (byte) f;
return null;
byte[]floatToByte(float f)
float To Byte
return intToByte(Float.floatToIntBits(f));