@Override
    public MediaType detect(InputStream input, Metadata metadata) throws IOException {
        String type = metadata.get(TikaCoreProperties.CONTENT_TYPE_PARSER_OVERRIDE);
        if (type != null) {
            return MediaType.parse(type);
        }
        type = metadata.get(TikaCoreProperties.CONTENT_TYPE_USER_OVERRIDE);
        if (type != null) {
            return MediaType.parse(type);
        } else {
            return MediaType.OCTET_STREAM;
        }
    }
Use this to force a content type detection via the
{@link TikaCoreProperties#CONTENT_TYPE_USER_OVERRIDE} key in the metadata object.
<p>
This is also required to override detection by some parsers
via {@link TikaCoreProperties#CONTENT_TYPE_PARSER_OVERRIDE}.

@deprecated after 2.5.0 this functionality was moved to the CompositeDetector
tika-core/src/main/java/org/apache/tika/detect/OverrideDetector.java