Package org.apache.camel.util
Class MimeTypeHelper
java.lang.Object
org.apache.camel.util.MimeTypeHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringprobeMimeType(String fileName) Probes the file name to determine the mime type (such as application/xml, text/plain).static StringsanitizeMimeType(String types) Sanitizes the mime types after URL encoding to convert space into plus sign.
-
Constructor Details
-
MimeTypeHelper
public MimeTypeHelper()
-
-
Method Details
-
sanitizeMimeType
Sanitizes the mime types after URL encoding to convert space into plus sign.- Parameters:
types- mime types such as from HTTP Accept header- Returns:
- the sanitized mime types
-
probeMimeType
Probes the file name to determine the mime type (such as application/xml, text/plain).- Parameters:
fileName- the file name, such as order.xml- Returns:
- the mime type, or null if not possible to determine.
-