Enum ContentType

  • All Implemented Interfaces:
    Serializable, Comparable<ContentType>

    public enum ContentType
    extends Enum<ContentType>

    Java class for ContentType.

    The following schema fragment specifies the expected content contained within this class.

     <simpleType name="ContentType">
       <restriction base="{http://www.w3.org/2001/XMLSchema}string">
         <enumeration value="id-data"/>
         <enumeration value="id-signedData"/>
         <enumeration value="id-envelopedData"/>
         <enumeration value="id-digestedData"/>
         <enumeration value="id-encryptedData"/>
         <enumeration value="id-ct-authData"/>
       </restriction>
     </simpleType>
     
    • Enum Constant Detail

      • ID_DATA

        public static final ContentType ID_DATA
        Generic, non cryptographic, or unqualified data content - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs7(7) 1)
      • ID_SIGNED_DATA

        public static final ContentType ID_SIGNED_DATA
        Signature CMS data content - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2)
      • ID_ENVELOPED_DATA

        public static final ContentType ID_ENVELOPED_DATA
        Encrypted CMS data content, with encryption key - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3)
      • ID_DIGESTED_DATA

        public static final ContentType ID_DIGESTED_DATA
        Message digest CMS data content - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs7(7) 5)
      • ID_ENCRYPTED_DATA

        public static final ContentType ID_ENCRYPTED_DATA
        Encrypted CMS data content - (OID: iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs7(7) 6)
      • ID_CT_AUTH_DATA

        public static final ContentType ID_CT_AUTH_DATA
        MAC CMS data content, with encryption key - (OID: iso(1) member- body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) ct(1) 2)
    • Method Detail

      • values

        public static ContentType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ContentType c : ContentType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ContentType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • value

        public String value()
        Value string.
        Returns:
        the string
      • fromValue

        public static ContentType fromValue​(String v)
        From value content type.
        Parameters:
        v - the v
        Returns:
        the content type