public String detect(String name) {
        try {
            return detect((InputStream) null, name);
        } catch (IOException e) {
            throw new IllegalStateException("Unexpected IOException", e);
        }
    }
Detects the media type of a document with the given file name.
The type detection is based on known file name extensions.
<p>
The given name can also be a URL or a full file path. In such cases
only the file name part of the string is used for type detection.

@param name the file name of the document
@return detected media type
tika-core/src/main/java/org/apache/tika/Tika.java