public final boolean canAcceptExtension(final String fileName) {
        final String[] extensions = getAcceptedExtensions();
        if (extensions == null) {
            return true;
        }
        final int index = fileName.lastIndexOf('.');
        if (index >= 0 && ArrayUtils.contains(extensions, fileName.substring(index + 1).toLowerCase(Locale.ROOT))) {
            return true;
        }
        return false;
    }
Tests whether the ImageParser implementation can accept the specified file name based on its extension.

@param fileName A valid string giving a file name or file path.
@return If the parser can accept the format, true; otherwise, false.
src/main/java/org/apache/commons/imaging/AbstractImageParser.java