Java Array Sub Array subArray(byte[] src, int pos, int length)

Here you can find the source of subArray(byte[] src, int pos, int length)

Description

sub Array

License

Open Source License

Declaration

public static byte[] subArray(byte[] src, int pos, int length) 

Method Source Code

//package com.java2s;

public class Main {
    public static byte[] subArray(byte[] src, int pos, int length) {
        if (src == null || src.length < length - pos) {
            throw new IllegalArgumentException();
        }/*from   www.  j  a v a  2s  . c  o m*/
        byte[] result = new byte[length];
        System.arraycopy(src, pos, result, 0, length);
        return result;
    }
}

Related

  1. subArray(byte[] in, int start, int end)
  2. subArray(byte[] input, int start)
  3. subArray(byte[] source, int start, int len)
  4. subarray(byte[] src, int beginIndex)
  5. subArray(byte[] src, int offset, int len)
  6. subArray(byte[] src, int start)
  7. subArray(byte[] src, int start, int limit)
  8. subarray(byte[] text, int from, int to)
  9. subarray(char[][] array, int start, int end)