Class ContentTypeUtils
java.lang.Object
org.activiti.cloud.services.common.util.ContentTypeUtils
Utils for handling content type
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringchangeExtension(String filename, String extension) static StringchangeToJsonFilename(String filename) static StringfullExtension(String extension) getContentTypeByExtension(String extension) Get the content type corresponding to an extension.getContentTypeByPath(String path) Get the content type corresponding to a path.static booleanisJsonContentType(String contentType) Check if a content type is jsonstatic booleanisSvgContentType(String contentType) Check if a content type is svg imagestatic StringremoveExtension(String filename, String extension) static StringsetExtension(String filename, String extension) static StringtoJsonFilename(String filename)
-
Field Details
-
JSON
- See Also:
-
DMN
- See Also:
-
XML
- See Also:
-
CONTENT_TYPE_JSON
-
CONTENT_TYPE_XML
-
CONTENT_TYPE_SVG
- See Also:
-
CONTENT_TYPE_PNG
- See Also:
-
CONTENT_TYPE_ZIP
- See Also:
-
EXTENSION_SEPARATOR
public static final char EXTENSION_SEPARATOR- See Also:
-
CONTENT_TYPES
-
-
Method Details
-
getContentTypeByExtension
Get the content type corresponding to an extension.- Parameters:
extension- the extension to search the content type for- Returns:
- the content type
-
getContentTypeByPath
Get the content type corresponding to a path.- Parameters:
path- the path to search the content type for- Returns:
- the content type
-
isJsonContentType
Check if a content type is json- Parameters:
contentType- the content type to check- Returns:
- true if the given content type is json
-
isSvgContentType
Check if a content type is svg image- Parameters:
contentType- the content type to check- Returns:
- true if the given content type is svg
-
toJsonFilename
-
changeToJsonFilename
-
setExtension
-
changeExtension
-
removeExtension
-
fullExtension
-