Class MimeTypeDetector


  • public class MimeTypeDetector
    extends java.lang.Object
    Utility stuff to detect mime type of binary data
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String detect​(ByteSource source, java.lang.String resourceName)  
      static java.lang.String detect​(java.io.File file)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • detect

        @Nonnull
        public static java.lang.String detect​(@Nonnull
                                              java.io.File file)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • detect

        @Nonnull
        public static java.lang.String detect​(@Nonnull
                                              ByteSource source,
                                              @Nullable
                                              java.lang.String resourceName)
                                       throws java.io.IOException
        Throws:
        java.io.IOException