private static int hash(byte[] name) {
    int h = 0;
    for (int i = 0; i < name.length; i++) {
      h = 31 * h + name[i];
    }
    if (h > 0) {
      return h;
    } else if (h == Integer.MIN_VALUE) {
      return Integer.MAX_VALUE;
    } else {
      return -h;
    }
  }
private static int hash(byte[] name) {
    int h = 0;
    for (int i = 0; i < name.length; i++) {
      h = 31 * h + name[i];
    }
    if (h > 0) {
      return h;
    } else if (h == Integer.MIN_VALUE) {
      return Integer.MAX_VALUE;
    } else {
      return -h;
    }
  }
private static int hash ( byte [ ] name ) { int h = 0 ; for ( int i = 0 ; i < name . length ; i ++ ) { h = 31 * h + name [ i ] ; } if ( h > 0 ) { return h ; } else if ( h == Integer . MIN_VALUE ) { return Integer . MAX_VALUE ; } else { return - h ; } }
Returns the hash code for the given header field name.
Returns the hash code for the given header field name .