Class MimeTypes

java.lang.Object
org.eclipse.jetty.http.MimeTypes
Direct Known Subclasses:
MimeTypes.Mutable

public class MimeTypes extends Object
MIME Type enum and utilities
  • Field Details

  • Constructor Details

    • MimeTypes

      public MimeTypes()
    • MimeTypes

      public MimeTypes(MimeTypes defaults)
  • Method Details

    • isKnownLocale

      public static boolean isKnownLocale(Locale locale)
    • getBaseType

      public static MimeTypes.Type getBaseType(String contentType)
    • getMimeByExtension

      public String getMimeByExtension(String filename)
      Get the MIME type by filename extension.
      Parameters:
      filename - A file name
      Returns:
      MIME type matching the last dot extension of the file name, or matching "*" if none found.
    • getMimeForExtension

      public String getMimeForExtension(String extension)
    • getCharsetInferredFromContentType

      public String getCharsetInferredFromContentType(String contentType)
    • getCharsetAssumedFromContentType

      public String getCharsetAssumedFromContentType(String contentType)
    • getMimeMap

      public Map<String,String> getMimeMap()
    • getInferredMap

      public Map<String,String> getInferredMap()
    • getAssumedMap

      public Map<String,String> getAssumedMap()
    • getCharsetFromContentType

      public static String getCharsetFromContentType(String value)
    • getContentTypeWithoutCharset

      public static String getContentTypeWithoutCharset(String value)