public BoyerMoore(byte[] pattern,int offset,int length,int R){
  this.R=R;
  this.pattern=new byte[length];
  System.arraycopy(pattern,offset,this.pattern,0,length);
  right=new int[R];
  for (int c=0; c < R; c++)   right[c]=-1;
  for (int j=0; j < pattern.length; j++)   right[pattern[j]]=j;
}

public BoyerMoore ( byte [ ] pattern , int offset , int length , int R ) { this . R = R ; this . pattern = new byte [ length ] ; System . arraycopy ( pattern , offset , this . pattern , 0 , length ) ; right = new int [ R ] ; for ( int c = 0 ; c < R ; c ++ ) right [ c ] = - 1 ; for ( int j = 0 ; j < pattern . length ; j ++ ) right [ pattern [ j ] ] = j ; }
preprocesses the pattern string .
