Here you can find the source of shift(final byte[] input, final int amount)
public static byte[] shift(final byte[] input, final int amount)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { public static byte[] shift(final byte[] input, final int amount) { final byte[] r = new byte[input.length + amount]; System.arraycopy(input, 0, r, amount, Math.min(input.length, r.length)); return r; }/*from w w w .j a v a 2 s. c o m*/ }