Android Array Search indexOf(byte[] data, byte search)

Here you can find the source of indexOf(byte[] data, byte search)

Description

index Of

Declaration

public static int indexOf(byte[] data, byte search) 

Method Source Code

//package com.java2s;

public class Main {

    public static int indexOf(byte[] data, byte search) {
        int len = data.length;
        for (int i = 0; i < len; i++) {
            if (data[i] == search) {
                return i;
            }/*from  ww w.  j a v  a2 s  .  c o  m*/
        }
        return -1;
    }
}

Related

  1. inArray(Object o, Object... arr)
  2. indexOf(byte[] bytes, byte[] pattern, int start)
  3. indexof(byte[] shortBytes, byte[] longBytes)