Package net.targetr.wtm3.cache
Class Mime
java.lang.Object
net.targetr.wtm3.cache.Mime
Maps resource path extensions to HTTP content types, including UTF-8 charset
parameters for supported text formats. Unknown extensions use
application/octet-stream.-
Constructor Summary
ConstructorsConstructorDescriptionMime()Creates a MIME type helper; lookups are available through static methods. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetContentType(String path) Guesses the MIME type from a given request path extension.
-
Constructor Details
-
Mime
public Mime()Creates a MIME type helper; lookups are available through static methods.
-
-
Method Details
-
getContentType
Guesses the MIME type from a given request path extension.- Parameters:
path- the resource's network path- Returns:
- the matching predefined content type, or
application/octet-streamif the extension is absent or unknown
-