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
Fields Modifier and Type Field Description static java.lang.String
BZIP2
AString
constant representing "application/x-bzip2" media type.static javax.ws.rs.core.MediaType
BZIP2_TYPE
AMediaType
constant representing "application/x-bzip2" media type.static java.lang.String
GZIP
AString
constant representing "application/x-gzip" media type.static javax.ws.rs.core.MediaType
GZIP_TYPE
AMediaType
constant representing "application/gzip" media type.static java.lang.String
TAR
AString
constant representing "application/x-tar" media type.static javax.ws.rs.core.MediaType
TAR_TYPE
AMediaType
constant representing "application/x-tar" media type.static java.lang.String
XGZIP
AString
constant representing "application/x-gzip" media type.static javax.ws.rs.core.MediaType
XGZIP_TYPE
AMediaType
constant representing "application/x-gzip" media type.static java.lang.String
ZIP
AString
constant representing "application/zip" media type.static javax.ws.rs.core.MediaType
ZIP_TYPE
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
Constructors Constructor Description CommonMediaType()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isSupportedFormat(java.lang.String mimeType)
Checks archive type if is supported by Vitam.static java.lang.String
mimeTypeOf(javax.ws.rs.core.MediaType mediaType)
Creates mime type codeString
of Media type.static javax.ws.rs.core.MediaType
valueOf(java.lang.String archivetype)
Creates an instance ofMediaType
by the supplied string.
-
-
-
Field Detail
-
ZIP
public static final java.lang.String ZIP
AString
constant representing "application/zip" media type.- See Also:
- Constant Field Values
-
ZIP_TYPE
public static final javax.ws.rs.core.MediaType ZIP_TYPE
AMediaType
constant representing "application/zip" media type.
-
TAR
public static final java.lang.String TAR
AString
constant representing "application/x-tar" media type.- See Also:
- Constant Field Values
-
TAR_TYPE
public static final javax.ws.rs.core.MediaType TAR_TYPE
AMediaType
constant representing "application/x-tar" media type.
-
XGZIP
public static final java.lang.String XGZIP
AString
constant representing "application/x-gzip" media type.- See Also:
- Constant Field Values
-
XGZIP_TYPE
public static final javax.ws.rs.core.MediaType XGZIP_TYPE
AMediaType
constant representing "application/x-gzip" media type.
-
GZIP
public static final java.lang.String GZIP
AString
constant representing "application/x-gzip" media type.- See Also:
- Constant Field Values
-
GZIP_TYPE
public static final javax.ws.rs.core.MediaType GZIP_TYPE
AMediaType
constant representing "application/gzip" media type.
-
BZIP2
public static final java.lang.String BZIP2
AString
constant representing "application/x-bzip2" media type.- See Also:
- Constant Field Values
-
BZIP2_TYPE
public static final javax.ws.rs.core.MediaType BZIP2_TYPE
AMediaType
constant representing "application/x-bzip2" media type.
-
-
Method Detail
-
valueOf
public static javax.ws.rs.core.MediaType valueOf(java.lang.String archivetype)
Creates an instance ofMediaType
by the supplied string.- Parameters:
archivetype
- the media type string.- Returns:
- the MediaType.
- Throws:
java.lang.IllegalArgumentException
- if the supplied string cannot be supported or isnull
.
-
mimeTypeOf
public static java.lang.String mimeTypeOf(javax.ws.rs.core.MediaType mediaType)
Creates mime type codeString
of Media type.- Parameters:
mediaType
-MediaType
- Returns:
- A
String
constant representing media type
-
isSupportedFormat
public static boolean isSupportedFormat(java.lang.String mimeType)
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
-
-