전 바이트배열에 넣어서 보냅니당.
자바는 스트링으로도 보낼수있긴한데 c엔 스트링이 없으니까..
int test=291;
Byte[] message = new Byte[4];
message[0] = test>>24&0x00ff;
message[1] = test>>16&0x00ff;
message[2] = test>>8&0x00ff;
message[3] = test&0x00ff;
해서 보내셔도되고 바이트 버퍼 이용해서
ByteBuffer bb = ByteBuffer.allocate(4);
bb.putInt(test);
버퍼에 넣고
bb.array();
하면 바이트배열로 리턴되요. 그걸 보내도 되구요