public static final void assertDirectoryListingEntry(int name_length, String name,
                                                         ChmCommons.EntryType entryType, int offset,
                                                         int length) throws ChmParsingException {
        if (name_length < 0) {
            throw new ChmParsingException("invalid name length");
        }
        if (name == null) {
            throw new ChmParsingException("invalid name");
        }

        if ((entryType != ChmCommons.EntryType.COMPRESSED) &&
                (entryType != ChmCommons.EntryType.UNCOMPRESSED)) {
            throw new ChmParsingException(
                    "invalid compressed type, should be EntryType.COMPRESSED | EntryType" +
                            ".UNCOMPRESSED");
        }

        if (offset < 0) {
            throw new ChmParsingException("invalid offset");
        }

        if (length < 0) {
            throw new ChmParsingException("invalid 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