Java Array Sub Array subArray(byte[] src, int start, int limit)

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

Description

sub Array

License

Open Source License

Declaration

public static byte[] subArray(byte[] src, int start, int limit) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static byte[] subArray(byte[] src, int start, int limit) {
        byte[] buff = new byte[limit];

        for (int i = 0; i < limit; i++) {
            buff[i] = src[start++];//from w  w  w.j a va  2s  .c om
        }
        return buff;
    }

    public static byte[] subArray(byte[] src, int start) {
        if (start < 0) {
            return subArray(src, src.length + start, -1 * start);
        }
        return subArray(src, start, src.length - start);
    }
}

Related

  1. subArray(byte[] source, int start, int len)
  2. subarray(byte[] src, int beginIndex)
  3. subArray(byte[] src, int offset, int len)
  4. subArray(byte[] src, int pos, int length)
  5. subArray(byte[] src, int start)
  6. subarray(byte[] text, int from, int to)
  7. subarray(char[][] array, int start, int end)
  8. subArray(double[] a, int begin, int end)
  9. subArray(double[] arr, int start, int fim)