code: protected int binarySearchBlockStartOffsets(long offset) {
      LocatedBlock key = new LocatedBlock();
      key.setStartOffset(offset);
      return Collections.binarySearch(blocks, key,
          BLOCK_START_OFFSET_COMPARATOR);
    }
docs: Find block containing the specified offset, or insertion point (encoded as
  -i-1) of the given offset among starting offsets of the blocks if there is
  no exact match. A nonnegative return value means an exact match.
  
  @return the index of the block starting with the given offset if there is
  an exact match, or <b>-i-1</b>, where i is is the insertion point
  of the given offset (as defined in
  {@link Collections#binarySearch(List, Object, Comparator)}).