To achieve the effect of resizing a byte array without loosing the content, there are several solutions in Java already mentioned:
1) ArrayList<Byte>
(see the answers of a.ch. and kgiannakakis)
2) System.arraycopy()
(see the answers of jimpic, kgiannakakis, and UVM)
Something like:
byte[] bytes = new byte[1024];
//
// Do some operations with array bytes
//
byte[] bytes2 = new byte[2024];
System.arraycopy(bytes,0,bytes2,0,bytes.length);
//
// Do some further operations with array bytes2 which contains
// the same first 1024 bytes as array bytes
3) I would like to add a third way which I think is most elegant: Arrays.copyOfRange()
byte[] bytes = new byte[1024];
//
// Do some operations with array bytes
//
bytes = Arrays.copyOfRange(bytes,0,2024);
//
// Do some further operations with array bytes whose first 1024 bytes
// didn't change and whose remaining bytes are padded with 0
Of course there are further solutions (e.g. copying the bytes in a loop). Concerning efficiency, see this