public boolean isIfMatch(byte[] check){
  if (if_match_list == null)   return true;
  for (  byte[] etag : if_match_list) {
    if (etag.length == 0)     return true;
    if (Arrays.equals(etag,check))     return true;
  }
  return false;
}

public boolean isIfMatch ( byte [ ] check ) { if ( if_match_list == null ) return true ; for ( byte [ ] etag : if_match_list ) { if ( etag . length == 0 ) return true ; if ( Arrays . equals ( etag , check ) ) return true ; } return false ; }
checks if the if - match options contain the given etag . this method can be used by a server to handle a conditional request . when called , the method assumes the resource does exist , so that an empty if - match option will match . the passed etag should be the one by the server denoting the current resource state .
