Package fr.gouv.vitam.common
Class CommonMediaType
java.lang.Object
javax.ws.rs.core.MediaType
fr.gouv.vitam.common.CommonMediaType
public class CommonMediaType
extends javax.ws.rs.core.MediaType
CommonMediaType contains a different archive mime type supported by Vitam
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
AString
constant representing "application/x-bzip2" media type.static final javax.ws.rs.core.MediaType
AMediaType
constant representing "application/x-bzip2" media type.static final String
AString
constant representing "application/x-gzip" media type.static final javax.ws.rs.core.MediaType
AMediaType
constant representing "application/gzip" media type.static final String
AString
constant representing "application/x-tar" media type.static final javax.ws.rs.core.MediaType
AMediaType
constant representing "application/x-tar" media type.static final String
static final javax.ws.rs.core.MediaType
static final String
AString
constant representing "application/x-gzip" media type.static final javax.ws.rs.core.MediaType
AMediaType
constant representing "application/x-gzip" media type.static final String
AString
constant representing "application/zip" media type.static final javax.ws.rs.core.MediaType
AMediaType
constant representing "application/zip" media type.Fields inherited from class javax.ws.rs.core.MediaType
APPLICATION_ATOM_XML, APPLICATION_ATOM_XML_TYPE, APPLICATION_FORM_URLENCODED, APPLICATION_FORM_URLENCODED_TYPE, APPLICATION_JSON, APPLICATION_JSON_PATCH_JSON, APPLICATION_JSON_PATCH_JSON_TYPE, APPLICATION_JSON_TYPE, APPLICATION_OCTET_STREAM, APPLICATION_OCTET_STREAM_TYPE, APPLICATION_SVG_XML, APPLICATION_SVG_XML_TYPE, APPLICATION_XHTML_XML, APPLICATION_XHTML_XML_TYPE, APPLICATION_XML, APPLICATION_XML_TYPE, CHARSET_PARAMETER, MEDIA_TYPE_WILDCARD, MULTIPART_FORM_DATA, MULTIPART_FORM_DATA_TYPE, SERVER_SENT_EVENTS, SERVER_SENT_EVENTS_TYPE, TEXT_HTML, TEXT_HTML_TYPE, TEXT_PLAIN, TEXT_PLAIN_TYPE, TEXT_XML, TEXT_XML_TYPE, WILDCARD, WILDCARD_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isSupportedFormat
(String mimeType) Checks archive type if is supported by Vitam.static String
mimeTypeOf
(javax.ws.rs.core.MediaType mediaType) Creates mime type codeString
of Media type.static javax.ws.rs.core.MediaType
Creates an instance ofMediaType
by the supplied string.Methods inherited from class javax.ws.rs.core.MediaType
equals, getParameters, getSubtype, getType, hashCode, isCompatible, isWildcardSubtype, isWildcardType, toString, withCharset
-
Field Details
-
ZIP
AString
constant representing "application/zip" media type.- See Also:
-
ZIP_TYPE
public static final javax.ws.rs.core.MediaType ZIP_TYPEAMediaType
constant representing "application/zip" media type. -
TAR
AString
constant representing "application/x-tar" media type.- See Also:
-
TAR_TYPE
public static final javax.ws.rs.core.MediaType TAR_TYPEAMediaType
constant representing "application/x-tar" media type. -
XGZIP
AString
constant representing "application/x-gzip" media type.- See Also:
-
XGZIP_TYPE
public static final javax.ws.rs.core.MediaType XGZIP_TYPEAMediaType
constant representing "application/x-gzip" media type. -
GZIP
AString
constant representing "application/x-gzip" media type.- See Also:
-
GZIP_TYPE
public static final javax.ws.rs.core.MediaType GZIP_TYPEAMediaType
constant representing "application/gzip" media type. -
BZIP2
AString
constant representing "application/x-bzip2" media type.- See Also:
-
BZIP2_TYPE
public static final javax.ws.rs.core.MediaType BZIP2_TYPEAMediaType
constant representing "application/x-bzip2" media type. -
TEXT_CSV
- See Also:
-
TEXT_CSV_MEDIATYPE
public static final javax.ws.rs.core.MediaType TEXT_CSV_MEDIATYPE
-
-
Constructor Details
-
CommonMediaType
public CommonMediaType()
-
-
Method Details
-
valueOf
Creates an instance ofMediaType
by the supplied string.- Parameters:
archivetype
- the media type string.- Returns:
- the MediaType.
- Throws:
IllegalArgumentException
- if the supplied string cannot be supported or isnull
.
-
mimeTypeOf
Creates mime type codeString
of Media type.- Parameters:
mediaType
-MediaType
- Returns:
- A
String
constant representing media type
-
isSupportedFormat
Checks archive type if is supported by Vitam.- Parameters:
mimeType
- the mime type to check- Returns:
- boolean : true if archive type supported by Vitam.
- Since:
- 0.10.0
-