Class XMimeTypeUtils


  • public class XMimeTypeUtils
    extends Object
    • Constructor Detail

      • XMimeTypeUtils

        public XMimeTypeUtils()
    • Method Detail

      • getContentType

        public static String getContentType​(File file)
      • getContentType

        public static String getContentType​(byte[] data)
      • getContentType

        public static String getContentType​(String filename)
      • getContentTypes

        public static Collection<?> getContentTypes​(byte[] data)
      • getContentTypes

        public static Collection<?> getContentTypes​(String filename)
      • getContentTypes

        public static Collection<?> getContentTypes​(File file)
      • isContentType

        public static boolean isContentType​(File file,
                                            String... contentTypes)
      • isContentType

        public static boolean isContentType​(InputStream is,
                                            String... contentTypes)
      • isContentType

        public static boolean isContentType​(String filename,
                                            String... contentTypes)
      • isContentType

        public static boolean isContentType​(byte[] data,
                                            String... contentTypes)
      • isMediaTypes

        public static boolean isMediaTypes​(File file,
                                           String mediaTypes)
      • isMediaTypes

        public static boolean isMediaTypes​(InputStream is,
                                           String mediaTypes)
      • isMediaTypes

        public static boolean isMediaTypes​(byte[] data,
                                           String mediaTypes)
      • isMediaTypes

        public static boolean isMediaTypes​(String filename,
                                           String mediaTypes)
      • containsMediaTypes

        public static boolean containsMediaTypes​(Collection<?> types,
                                                 String... mediaTypes)
      • containsContentTypes

        public static boolean containsContentTypes​(Collection<?> types,
                                                   String... contentTypes)