Class 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
      A String constant representing "application/x-bzip2" media type.
      static javax.ws.rs.core.MediaType BZIP2_TYPE
      A MediaType constant representing "application/x-bzip2" media type.
      static java.lang.String GZIP
      A String constant representing "application/x-gzip" media type.
      static javax.ws.rs.core.MediaType GZIP_TYPE
      A MediaType constant representing "application/gzip" media type.
      static java.lang.String TAR
      A String constant representing "application/x-tar" media type.
      static javax.ws.rs.core.MediaType TAR_TYPE
      A MediaType constant representing "application/x-tar" media type.
      static java.lang.String XGZIP
      A String constant representing "application/x-gzip" media type.
      static javax.ws.rs.core.MediaType XGZIP_TYPE
      A MediaType constant representing "application/x-gzip" media type.
      static java.lang.String ZIP
      A String constant representing "application/zip" media type.
      static javax.ws.rs.core.MediaType ZIP_TYPE
      A MediaType 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 code String of Media type.
      static javax.ws.rs.core.MediaType valueOf​(java.lang.String archivetype)
      Creates an instance of MediaType by the supplied string.
      • Methods inherited from class javax.ws.rs.core.MediaType

        equals, getParameters, getSubtype, getType, hashCode, isCompatible, isWildcardSubtype, isWildcardType, toString, withCharset
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ZIP

        public static final java.lang.String ZIP
        A String constant representing "application/zip" media type.
        See Also:
        Constant Field Values
      • ZIP_TYPE

        public static final javax.ws.rs.core.MediaType ZIP_TYPE
        A MediaType constant representing "application/zip" media type.
      • TAR

        public static final java.lang.String TAR
        A String constant representing "application/x-tar" media type.
        See Also:
        Constant Field Values
      • TAR_TYPE

        public static final javax.ws.rs.core.MediaType TAR_TYPE
        A MediaType constant representing "application/x-tar" media type.
      • XGZIP

        public static final java.lang.String XGZIP
        A String constant representing "application/x-gzip" media type.
        See Also:
        Constant Field Values
      • XGZIP_TYPE

        public static final javax.ws.rs.core.MediaType XGZIP_TYPE
        A MediaType constant representing "application/x-gzip" media type.
      • GZIP_TYPE

        public static final javax.ws.rs.core.MediaType GZIP_TYPE
        A MediaType constant representing "application/gzip" media type.
      • BZIP2

        public static final java.lang.String BZIP2
        A String constant representing "application/x-bzip2" media type.
        See Also:
        Constant Field Values
      • BZIP2_TYPE

        public static final javax.ws.rs.core.MediaType BZIP2_TYPE
        A MediaType constant representing "application/x-bzip2" media type.
    • Constructor Detail

      • CommonMediaType

        public CommonMediaType()
    • Method Detail

      • valueOf

        public static javax.ws.rs.core.MediaType valueOf​(java.lang.String archivetype)
        Creates an instance of MediaType 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 is null.
      • mimeTypeOf

        public static java.lang.String mimeTypeOf​(javax.ws.rs.core.MediaType mediaType)
        Creates mime type code String 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