Given
private int width = 400; private byte [] data = new byte [2];
I want to split the integer \"width\" into two bytes and load data[0]
I suggest you have a look at the source for HeapByteBuffer. It has the conversion code for all primitive data types. (In fact you could just use a ByteBuffer ;)