Package org.eclipse.jetty.http
Class MimeTypes
- java.lang.Object
-
- org.eclipse.jetty.http.MimeTypes
-
@Deprecated(since="2021-05-27") public class MimeTypes extends 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.
-
Field Summary
Fields Modifier and Type Field Description static Trie<MimeTypes.Type>
CACHE
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(String extension, String type)
Deprecated.Set a mime mappingstatic Map<String,String>
getAssumedEncodings()
Deprecated.Access a mutable map of mime type to the charset assumed for that content type.static String
getCharsetAssumedFromContentType(String contentType)
Deprecated.static String
getCharsetFromContentType(String value)
Deprecated.static String
getCharsetInferredFromContentType(String contentType)
Deprecated.static String
getContentTypeWithoutCharset(String value)
Deprecated.static String
getDefaultMimeByExtension(String filename)
Deprecated.Get the MIME type by filename extension.static Map<String,String>
getInferredEncodings()
Deprecated.Access a mutable map of mime type to the charset inferred from that content type.static Set<String>
getKnownMimeTypes()
Deprecated.String
getMimeByExtension(String filename)
Deprecated.Get the MIME type by filename extension.Map<String,String>
getMimeMap()
Deprecated.static String
inferCharsetFromContentType(String contentType)
Deprecated.void
setMimeMap(Map<String,String> mimeMap)
Deprecated.
-
-
-
Field Detail
-
CACHE
public static final Trie<MimeTypes.Type> CACHE
Deprecated.
-
-
Method Detail
-
setMimeMap
public void setMimeMap(Map<String,String> mimeMap)
Deprecated.- Parameters:
mimeMap
- A Map of file extension to mime-type.
-
getDefaultMimeByExtension
public static String getDefaultMimeByExtension(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 String getMimeByExtension(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(String extension, String type)
Deprecated.Set a mime mapping- Parameters:
extension
- the extensiontype
- the mime type
-
getInferredEncodings
public static Map<String,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 Map<String,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 String inferCharsetFromContentType(String contentType)
Deprecated.
-
getCharsetInferredFromContentType
public static String getCharsetInferredFromContentType(String contentType)
Deprecated.
-
getCharsetAssumedFromContentType
public static String getCharsetAssumedFromContentType(String contentType)
Deprecated.
-
-