@Override
  public boolean equals(Object obj) {
    if (!(obj instanceof MultiByteBuff)) return false;
    if (this == obj) return true;
    MultiByteBuff that = (MultiByteBuff) obj;
    if (this.capacity() != that.capacity()) return false;
    if (
      ByteBuff.compareTo(this, this.position(), this.limit(), that, that.position(), that.limit())
          == 0
    ) {
      return true;
    }
    return false;
  }
Copy the content from this MBB to a byte[] based on the given offset and length the position
from where the copy should start the length upto which the copy has to be done
@return byte[] with the copied contents from this MBB.
hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java