public final FormatCompliance getFormatCompliance(final File file) throws ImagingException, IOException {
        if (!canAcceptExtension(file)) {
            return null;
        }

        return getFormatCompliance(ByteSource.file(file));
    }
Determines the format compliance of the specified file based on rules provided by a specific implementation.

@param file A valid reference to a file.
@return A valid format compliance object.
@throws ImagingException may be thrown by sub-classes
@throws IOException      may be thrown by sub-classes
src/main/java/org/apache/commons/imaging/AbstractImageParser.java