Use System.arraycopy for buffer shifts.