SyntaxFix
Write A Post
Hire A Developer
Questions
You can convert yourInt to bytes by using a ByteBuffer like this:
yourInt
ByteBuffer
return ByteBuffer.allocate(4).putInt(yourInt).array();
Beware that you might have to think about the byte order when doing so.