Class MimeTypes


  • @Deprecated(since="2021-05-27")
    public class MimeTypes
    extends java.lang.Object
    Deprecated.
    The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.
    MIME Type enum and utilities
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MimeTypes.Type
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      MimeTypes()
      Deprecated.
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void addMimeMapping​(java.lang.String extension, java.lang.String type)
      Deprecated.
      Set a mime mapping
      static java.util.Map<java.lang.String,​java.lang.String> getAssumedEncodings()
      Deprecated.
      Access a mutable map of mime type to the charset assumed for that content type.
      static java.lang.String getCharsetAssumedFromContentType​(java.lang.String contentType)
      Deprecated.
       
      static java.lang.String getCharsetFromContentType​(java.lang.String value)
      Deprecated.
       
      static java.lang.String getCharsetInferredFromContentType​(java.lang.String contentType)
      Deprecated.
       
      static java.lang.String getContentTypeWithoutCharset​(java.lang.String value)
      Deprecated.
       
      static java.lang.String getDefaultMimeByExtension​(java.lang.String filename)
      Deprecated.
      Get the MIME type by filename extension.
      static java.util.Map<java.lang.String,​java.lang.String> getInferredEncodings()
      Deprecated.
      Access a mutable map of mime type to the charset inferred from that content type.
      static java.util.Set<java.lang.String> getKnownMimeTypes()
      Deprecated.
       
      java.lang.String getMimeByExtension​(java.lang.String filename)
      Deprecated.
      Get the MIME type by filename extension.
      java.util.Map<java.lang.String,​java.lang.String> getMimeMap()
      Deprecated.
       
      static java.lang.String inferCharsetFromContentType​(java.lang.String contentType)
      Deprecated.
      void setMimeMap​(java.util.Map<java.lang.String,​java.lang.String> mimeMap)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MimeTypes

        public MimeTypes()
        Deprecated.
        Constructor.
    • Method Detail

      • getMimeMap

        public java.util.Map<java.lang.String,​java.lang.String> getMimeMap()
        Deprecated.
      • setMimeMap

        public void setMimeMap​(java.util.Map<java.lang.String,​java.lang.String> mimeMap)
        Deprecated.
        Parameters:
        mimeMap - A Map of file extension to mime-type.
      • getDefaultMimeByExtension

        public static java.lang.String getDefaultMimeByExtension​(java.lang.String filename)
        Deprecated.
        Get the MIME type by filename extension. Lookup only the static default mime map.
        Parameters:
        filename - A file name
        Returns:
        MIME type matching the longest dot extension of the file name.
      • getMimeByExtension

        public java.lang.String getMimeByExtension​(java.lang.String filename)
        Deprecated.
        Get the MIME type by filename extension. Lookup the content and static default mime maps.
        Parameters:
        filename - A file name
        Returns:
        MIME type matching the longest dot extension of the file name.
      • addMimeMapping

        public void addMimeMapping​(java.lang.String extension,
                                   java.lang.String type)
        Deprecated.
        Set a mime mapping
        Parameters:
        extension - the extension
        type - the mime type
      • getKnownMimeTypes

        public static java.util.Set<java.lang.String> getKnownMimeTypes()
        Deprecated.
      • getCharsetFromContentType

        public static java.lang.String getCharsetFromContentType​(java.lang.String value)
        Deprecated.
      • getInferredEncodings

        public static java.util.Map<java.lang.String,​java.lang.String> getInferredEncodings()
        Deprecated.
        Access a mutable map of mime type to the charset inferred from that content type. An inferred encoding is used by when encoding/decoding a stream and is explicitly set in any metadata (eg Content-Type).
        Returns:
        Map of mime type to charset
      • getAssumedEncodings

        public static java.util.Map<java.lang.String,​java.lang.String> getAssumedEncodings()
        Deprecated.
        Access a mutable map of mime type to the charset assumed for that content type. An assumed encoding is used by when encoding/decoding a stream, but is not explicitly set in any metadata (eg Content-Type).
        Returns:
        Map of mime type to charset
      • inferCharsetFromContentType

        @Deprecated
        public static java.lang.String inferCharsetFromContentType​(java.lang.String contentType)
        Deprecated.
      • getCharsetInferredFromContentType

        public static java.lang.String getCharsetInferredFromContentType​(java.lang.String contentType)
        Deprecated.
      • getCharsetAssumedFromContentType

        public static java.lang.String getCharsetAssumedFromContentType​(java.lang.String contentType)
        Deprecated.
      • getContentTypeWithoutCharset

        public static java.lang.String getContentTypeWithoutCharset​(java.lang.String value)
        Deprecated.