public static void assertCopyingDataIndex(int index, int dataLength)
            throws ChmParsingException {
        if (index >= dataLength) {
            throw new ChmParsingException("cannot parse chm file index > data.length");
        }
    }
Checks validity of the DirectoryListingEntry's parameters In case of
invalid parameter(s) throws an exception

@param name_length length of the chm entry name
@param name        chm entry name
@param entryType   EntryType
@param offset
@param length
@throws ChmParsingException
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/chm/ChmAssert.java