org.apache.any23.mime
Interface MIMETypeDetector

All Known Implementing Classes:
NaiveMIMETypeDetector, TikaMIMETypeDetector

public interface MIMETypeDetector

This detector is able to estimate the MIME type of some given raw data.


Method Summary
 MIMEType guessMIMEType(String fileName, InputStream input, MIMEType mimeTypeFromMetadata)
          Estimates the MIME type of the content of input file.
 

Method Detail

guessMIMEType

MIMEType guessMIMEType(String fileName,
                       InputStream input,
                       MIMEType mimeTypeFromMetadata)
Estimates the MIME type of the content of input file.

Parameters:
fileName - name of the file.
input - content of the file.
mimeTypeFromMetadata - mimetype declared in metadata.
Returns:
the supposed mime type or null if nothing appropriate found.


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.