Java Array Shift shift(final byte[] input, final int amount)

Here you can find the source of shift(final byte[] input, final int amount)

Description

shift

License

Open Source License

Declaration

public static byte[] shift(final byte[] input, final int amount) 

Method Source Code

//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*/
}

Related

  1. arrayShift(Object[] input, int shift)
  2. arrayShiftArgs(int[] array, int a)
  3. shift(double[] a, int shift, double insert)
  4. shift(double[] x, int N)
  5. shift(final double[] values, final double constant)
  6. shift(final Object[] array, int offset)
  7. Shift(int[] in, int amt, int spare)
  8. shift(int[] v, int n)