public class InfoTypeAndValue extends java.lang.Object implements ASN1Type
InfoTypeAndValue ::= SEQUENCE {
infoType OBJECT IDENTIFIER,
infoValue ANY DEFINED BY infoType OPTIONAL
}
-- Example InfoTypeAndValue contents include, but are not limited to:
-- { CAProtEncCert = {id-it 1}, Certificate }
-- { SignKeyPairTypes = {id-it 2}, SEQUENCE OF AlgorithmIdentifier }
-- { EncKeyPairTypes = {id-it 3}, SEQUENCE OF AlgorithmIdentifier }
-- { PreferredSymmAlg = {id-it 4}, AlgorithmIdentifier }
-- { CAKeyUpdateInfo = {id-it 5}, CAKeyUpdAnnContent }
-- { CurrentCRL = {id-it 6}, CertificateList }
-- where {id-it} = {id-pkix 4} = {1 3 6 1 5 5 7 4}
-- This construct MAY also be used to define new PKIX Certificate
-- Management Protocol request and response messages, or general-
-- purpose (e.g., announcement) messages for future needs or for
-- specific environments.
| Modifier and Type | Field and Description |
|---|---|
protected ObjectID |
m_type
An object identifier for the information.
|
protected ASN1Object |
m_value
The actual information value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
InfoTypeAndValue()
This is the default constructor.
|
|
InfoTypeAndValue(ASN1Object obj)
Creates a new
InfoTypeAndValue object from an
ASN1Object. |
|
InfoTypeAndValue(ObjectID type)
Creates a new
InfoTypeAndValue object with the specified
component. |
|
InfoTypeAndValue(ObjectID type,
ASN1Object value)
Creates a new
InfoTypeAndValue object with the specified
components. |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(ASN1Object obj)
Decodes an InfoTypeAndValue structure from an
ASN1Object. |
ObjectID |
getType()
Returns the object identifier for the information.
|
ASN1Object |
getValue()
Returns the actual information value if it exists; otherwise
null is returned. |
protected void |
setType(ObjectID type)
Sets the information type.
|
void |
setValue(ASN1Object value)
Sets the information value.
|
ASN1Object |
toASN1Object()
Encodes this
InfoTypeAndValue object as an
ASN1Object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
InfoTypeAndValue object. |
protected ObjectID m_type
protected ASN1Object m_value
protected InfoTypeAndValue()
InfoTypeAndValue sub-classes, and is not intended for
any other use.public InfoTypeAndValue(ObjectID type)
InfoTypeAndValue object with the specified
component.type - an object identifier for the informationpublic InfoTypeAndValue(ObjectID type, ASN1Object value)
InfoTypeAndValue object with the specified
components.type - an object identifier for the informationvalue - the actual value of the informationpublic InfoTypeAndValue(ASN1Object obj) throws CodingException
InfoTypeAndValue object from an
ASN1Object.obj - the ASN.1 representation of an InfoTypeAndValue structureCodingException - thrown if an errors occurs while decoding the ANS1Objectpublic ObjectID getType()
public ASN1Object getValue()
null is returned.protected void setType(ObjectID type)
The information type cannot be set to null.
type - the type componentpublic void setValue(ASN1Object value)
value - the value componentpublic void decode(ASN1Object obj) throws CodingException
ASN1Object.decode in interface ASN1Typeobj - an ASN.1 representation of an InfoTypeAndValue structureCodingException - thrown if an errors occurs while decoding the
ANS1Objectpublic ASN1Object toASN1Object()
InfoTypeAndValue object as an
ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
InfoTypeAndValue object.toString in class java.lang.Object