private boolean checkCallerProvidedOnDiskSizeWithHeader(long value) {
      // same validation logic as is used by Math.toIntExact(long)
      int intValue = (int) value;
      if (intValue != value) {
        if (LOG.isTraceEnabled()) {
          LOG.trace("onDiskSizeWithHeaderL={}; value exceeds int size limits.", value);
        }
        return false;
      }
      if (intValue == -1) {
        // a magic value we expect to see.
        return true;
      }
      return checkOnDiskSizeWithHeader(intValue);
    }
Check that {@code value} provided by the calling context seems reasonable, within a large
margin of error.
@return {@code true} if the value is safe to proceed, {@code false} otherwise.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java