public int isMatch(char[] buffer,int pos,int bufferStart,int bufferEnd){
  return Arrays.binarySearch(chars,buffer[pos]) >= 0 ? 1 : 0;
}

public int isMatch ( char [ ] buffer , int pos , int bufferStart , int bufferEnd ) { return Arrays . binarySearch ( chars , buffer [ pos ] ) >= 0 ? 1 : 0 ; }
returns whether or not the given charatcer matches .
