@Override
  public ByteRange putInt(int index, int val) {
    // This writing is same as BB's putInt. When byte[] is wrapped in a BB and
    // call getInt(), one
    // can get the same result.
    for (int i = Bytes.SIZEOF_INT - 1; i > 0; i--) {
      bytes[offset + index + i] = (byte) val;
      val >>>= 8;
    }
    bytes[offset + index] = (byte) val;
    clearHashCache();
    return this;
  }
Create a new {@code ByteRange} over the provided {@code bytes}. The array to wrap. The offset
into {@code bytes} considered the beginning of this range. The length of this range.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/SimpleMutableByteRange.java