Java Binary Search binarySearch(byte[] readBuffer, int offset, int length, byte value)

Here you can find the source of binarySearch(byte[] readBuffer, int offset, int length, byte value)

Description

binary Search

License

Open Source License

Declaration

public static int binarySearch(byte[] readBuffer, int offset,
            int length, byte value) 

Method Source Code

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

public class Main {
    public static int binarySearch(byte[] readBuffer, int offset,
            int length, byte value) {

        for (int i = offset; i < length; i++) {
            if (readBuffer[i] == value)
                return i;
        }//from www.  j a v  a2  s . c o m
        return -1;
    }
}

Related

  1. binarySearch(byte[] a, byte key, int startPos)
  2. binarySearch(byte[] a, int key)
  3. binarySearch(char[] arr, int key)
  4. binarySearch(double experience, int min, int max)
  5. binarySearch(double values[], double search)
  6. binarySearch(double[] a, double key)