private static int getOnDiskSizeWithHeader(final ByteBuff headerBuf, boolean checksumSupport) {
    return headerBuf.getInt(Header.ON_DISK_SIZE_WITHOUT_HEADER_INDEX) + headerSize(checksumSupport);
  }
Parse total on disk size including header and checksum.
@param headerBuf       Header ByteBuffer. Presumed exact size of header.
@param checksumSupport true if checksum verification is in use.
@return Size of the block with header included.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java