Transforms a primitive array into an array of boxed values.
@param src source array
@param srcPos start position
@param len length
@return array
964947
public static Object[] boxAll(Object src, int srcPos, int len) {
        switch (tId(src.getClass())) {
            case I_BOOLEAN:     return box((boolean[]) src, srcPos, len);
            case I_BYTE:        return box((byte[]) src, srcPos, len);
            case I_CHARACTER:   return box((char[]) src, srcPos, len);
            case I_DOUBLE:      return box((double[]) src, srcPos, len);
            case I_FLOAT:       return box((float[]) src, srcPos, len);
            case I_INTEGER:     return box((int[]) src, srcPos, len);
            case I_LONG:        return box((long[]) src, srcPos, len);
            case I_SHORT:       return box((short[]) src, srcPos, len);
        }
        throw new IllegalArgumentException("No primitive array: " + src);
    }
507397
public static long[] unboxLongs(Object src, int srcPos, int len) {
        return unboxLongs(array(src), srcPos, len);
    }
888917
public static byte[] getIncreasingByteArray(int start, int len) {
    byte[] ret = new byte[len];
    for (int k = 0; k < len; k++) {
      ret[k] = (byte) (k + start);
    }
    return ret;
  }
148258
public static Object copy(Object src, int srcPos, Object dest, int destPos, int length) {
		System.arraycopy(src, srcPos, dest, destPos, length);
		return dest;
	}
117408
public static byte decodeByte(byte[] src, int srcOffset)
        throws CorruptEncodingException
    {
        try {
            return (byte)(src[srcOffset] ^ 0x80);
        } catch (IndexOutOfBoundsException e) {
            throw new CorruptEncodingException(null, e);
        }
    }
1066167
public static void copy(final Object src, final int srcPos, final Object dest, final int destPos, final int length) {
        if (Array.getLength(src) < srcPos + length) {
            throw new IllegalArgumentException("The size of src array less than " + (srcPos + length));
        }

        if (Array.getLength(dest) < destPos + length) {
            throw new IllegalArgumentException("The size of dest array less than " + (destPos + length));
        }

        System.arraycopy(src, srcPos, dest, destPos, length);
    }
489384
private static byte[] readFrom(File src) throws IOException {
        long srcsize = src.length();
        if (srcsize > Integer.MAX_VALUE) {
            throw new IllegalArgumentException(
                    "File too big to be loaded in memory");
        }
        FileInputStream inputStream = new FileInputStream(src);
        byte[] array = new byte[(int) srcsize];
        try {
            FileChannel fileChannel = inputStream.getChannel();
            ByteBuffer byteBuffer = ByteBuffer.wrap(array);
            int read = 0;
            while (read < srcsize) {
                read += fileChannel.read(byteBuffer);
            }
        } finally {
            inputStream.close();
        }
        return array;
    }
920818
public static Object deepUnbox(Object[] src) {
        Class<?> resultType = arrayBoxingType(src.getClass());
        return deepUnbox(resultType, src);
    }
854203
public static long[] xorI(long[] v, long[] o) {
    assert (o.length <= v.length) : "Bit set sizes do not agree.";
    for(int i = 0; i < o.length; i++) {
      v[i] ^= o[i];
    }
    return v;
  }
218823
public static byte[] unboxBytes(Object src, int srcPos, int len) {
        return unboxBytes(array(src), srcPos, len);
    }
715532
public static String[] toArray(final Vector src) {
    final String[] retval = new String[src.size()];
    src.copyInto(retval);
    return retval;
  }
1324990
public static <T> T unboxAllAs(Object src, Class<T> type) {
        return (T) unboxAll(type, src, 0, -1);
    }
1104990
public StrBuilder append(char[] src, int srcPos, int length) {
		return insert(this.position, src, srcPos, length);
	}
669584
private int[] initSBox(byte[] key) {
		int[] sbox = new int[SBOX_LENGTH];
		int j = 0;

		for (int i = 0; i < SBOX_LENGTH; i++) {
			sbox[i] = i;
		}

		for (int i = 0; i < SBOX_LENGTH; i++) {
			j = (j + sbox[i] + (key[i % key.length]) & 0xFF) % SBOX_LENGTH;
			swap(i, j, sbox);
		}
		return sbox;
	}
1244186
public static ByteBuffer copy(ByteBuffer src, int srcStart, ByteBuffer dest, int destStart, int length) {
		System.arraycopy(src.array(), srcStart, dest.array(), destStart, length);
		return dest;
	}
90924
public static Long[] boxLongs(Object src, int srcPos, int len) {
        return boxLongs(array(src), srcPos, len);
    }
1197632
function compactSparseArray (array) {
        var index = -1,
            length = array ? array.length : 0,
            result = [];

        while (++index < length) {
            var value = array[index];

            if (value) {
                result.push(value);
            }
        }

        return result;
    }