How can I be converting from
float or integer (if that's possible) to a byte array in Java.
Theoretically you would need to create 1 byte array with 2 positions. Is there any way to 'automate' this?
This would create an array with 4 positions. Bytes alone won't do much.
Documentation . There it shows the methods for dealing with the other types you might want. What this class does is just treat the data as if they were just bytes.