Interface IMimeUtil
public interface IMimeUtil
-
Method Summary
Modifier and TypeMethodDescriptiongetContentTypeFromLocation
(String location) Returns the appropriate mime type for this file locationgetEncoding
(String mimeType) Returns encoding from mimeType string, null if not definedgetMimeExtension
(String mimeType) Get the appropriate extension for any given mime typegetMimeType
(String ext) Returns the appropriate mime type for the extensionboolean
isCompressed
(String mimeType) Returns whether this is a compressed mimeTypeboolean
isStreaming
(String mimeType) Returns whether this is a streaming media mimeTypesetEncoding
(String mimeType, String encoding) stripEncoding
(String mimeType) Strips any encoding from this mime-type
-
Method Details
-
getContentTypeFromLocation
Returns the appropriate mime type for this file location- Parameters:
location
-- Returns:
-
getMimeType
Returns the appropriate mime type for the extension- Parameters:
ext
- might be: .xls- Returns:
- the result mimeTypeRaw for example: image/jpeg
-
getEncoding
Returns encoding from mimeType string, null if not defined- Parameters:
mimeType
-- Returns:
-
setEncoding
-
getMimeExtension
Get the appropriate extension for any given mime type- Parameters:
mimeType
- for example: image/jpeg- Returns:
- the appropriate extension for example: .jpg
-
isCompressed
Returns whether this is a compressed mimeType- Parameters:
mimeType
- for example: image/jpeg- Returns:
- true, if compressed, false otherwise... Defaults to true
-
isStreaming
Returns whether this is a streaming media mimeType- Parameters:
mimeType
- for example: video/avi- Returns:
- true, if streaming, false otherwise... Defaults to false
-
stripEncoding
Strips any encoding from this mime-type- Parameters:
mimeType
-- Returns:
-