public final class ContentTypeUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_TYPE_JSON |
static String |
CONTENT_TYPE_SVG |
static String |
CONTENT_TYPE_XML |
static String |
CONTENT_TYPE_ZIP |
static String |
JSON |
| Modifier and Type | Method and Description |
|---|---|
static String |
fullExtension(String extension) |
static Optional<String> |
getContentTypeByExtension(String extension)
Get the content type corresponding to an extension.
|
static Optional<String> |
getContentTypeByPath(String path)
Get the content type corresponding to a path.
|
static boolean |
isJsonContentType(String contentType)
Check if a content type is json
|
static String |
removeExtension(String filename,
String extension) |
static String |
setExtension(String filename,
String extension) |
static String |
toJsonFilename(String filename) |
public static final String JSON
public static final String CONTENT_TYPE_JSON
public static final String CONTENT_TYPE_XML
public static final String CONTENT_TYPE_SVG
public static final String CONTENT_TYPE_ZIP
public static Optional<String> getContentTypeByExtension(String extension)
extension - the extension to search the content type forpublic static Optional<String> getContentTypeByPath(String path)
path - the path to search the content type forpublic static boolean isJsonContentType(String contentType)
contentType - the content type to checkCopyright © 2017–2018 Alfresco. All rights reserved.