Hi. Isn't there anything out of the box to convert...
# announcements
i
Hi. Isn't there anything out of the box to convert an
Int
into a
ByteArray
?
d
Hi. As I know there is no nothing specific. You can use Java’s ByteBuffer function called
putInt(int_val)
https://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html#putInt(int)
i
@darych okay. I did this
ByteBuffer.allocate(Int.SIZE_BYTES).putInt(myInt)
👍 3
thanks