private static void checkCopyOfRangeParams(byte[] original, int from, int to) {
        if (original == null) {
            throw new NullPointerException("array is null");
        }
        if (from < 0) {
            throw new IllegalArgumentException(from + " should be > 0");
        }
        if (to < 0) {
            throw new IllegalArgumentException(to + " should be > 0");
        }
        if (to > original.length) {
            throw new IllegalArgumentException("can't copy beyond array length");
        }
    }
Searches for some pattern in the directory listing entry list
This requires that the entry name start with "::DataSpaceStorage"
See TIKA-4204

@param list
@param pattern
@return an index, if nothing found returns -1
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/chm/ChmCommons.java