I have a byte array sent via UDP from x-plane. The bytes (4) are all floats or integers… I tried to cast them to floats but no luck so far…
Example array: byte d
Use a DataInputStream as follows:
DataInputStream
DataInputStream dis = new DataInputStream(new ByteArrayInputStream(data)); float f = dis.readFloat(); //or if it's an int: int i = dis.readInt();