Class NaiveMIMETypeDetector

    • Constructor Detail

      • NaiveMIMETypeDetector

        public NaiveMIMETypeDetector()
    • Method Detail

      • guessMIMEType

        public MIMEType guessMIMEType​(String fileName,
                                      InputStream input,
                                      MIMEType mimeTypeFromMetadata)
        Description copied from interface: MIMETypeDetector
        Estimates the MIME type of the content of input file.
        Specified by:
        guessMIMEType in interface MIMETypeDetector
        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.