대략 아래와 같이 하시면 될 듯 합니다.
상상 코딩이라. offset 값이 맞나 모르겠네요...ㅎㅎ
ByteBuffer dst = ByteBuffer.allocate(4096);
dst.put(src,1023, 1024);
dst.put(src,0, 1024);
dst.put(src,3067, 1024);
dst.put(src,2047, 1024);
src = dst.array();
혹은 아래와 같이 해 주셔도 됩니다.
byte dst[] = new byte[4096];
System.arraycopy(src, 1023, dst, 0, 1024);
System.arraycopy(src, 0, dst, 1023, 1024);
System.arraycopy(src, 3067, dst, 2047, 1024);
System.arraycopy(src, 2047, dst, 3067, 1024);
src = dst;