Well, the byte number range is -128 to +127, and 245 is out of that range.
That's why the conversion results in a byte array, not a byte: 32-bit integer -> 4 8-bit bytes
Assuming you need this conversion to store integers into your database file, consider looking at the RandomAccessFile's method writeInt(). It does already what you need.
My HotelBookingRecord stores everything as byte arrays. The byte conversion was for a decorator that allowed you to interact with it using String (no problem there), booleans and integers.
I probably should rethink the strategy - but that's for later today
Thanks to you both for discussing this.