public boolean isEqual(byte[] left, int leftLength, long rightOffset, int rightLength) {
    if (rightLength != leftLength) {
      return false;
    }
    return isEqual(left, 0, getBufferIndex(rightOffset), getOffset(rightOffset), leftLength);
  }
Compares part of the buffer with a part of an external byte array.
Does not modify readPoint.
serde/src/java/org/apache/hadoop/hive/serde2/WriteBuffers.java