@Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null || getClass() != obj.getClass()) return false;
    HashedBytes other = (HashedBytes) obj;
    return (hashCode == other.hashCode) && Arrays.equals(bytes, other.bytes);
  }
This class encapsulates a byte array and overrides hashCode and equals so that it's identity is
based on the data rather than the array instance.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/HashedBytes.java