public class ErrorMsgContent extends java.lang.Object implements ASN1Type
ErrorMsgContent ::= SEQUENCE {
pKIStatusInfo PKIStatusInfo,
errorCode INTEGER OPTIONAL,
-- implementation-specific error codes
errorDetails PKIFreeText OPTIONAL
-- implementation-specific error details
}
PKIFreeText ::= SEQUENCE SIZE (1..MAX) OF UTF8String
-- text encoded as UTF-8 String (note: each UTF8String SHOULD
-- include an RFC 1766 language tag to indicate the language
-- of the contained text)
| Constructor and Description |
|---|
ErrorMsgContent(ASN1Object obj)
Creates a new
ErrorMsgContent object from an
ASN1Object. |
ErrorMsgContent(PKIStatusInfo pkiStatusInfo)
Creates a new
ErrorMsgContent object with the specified
component. |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorDetails(java.lang.String errorDetails)
Adds the specified error information to set of implementation-specific
error details.
|
void |
decode(ASN1Object obj)
Decodes an ErrorMsgContent structure from an
ASN1Object. |
java.math.BigInteger |
getErrorCode()
Returns the implementation-specific error code if it has been set;
otherwise
null is returned. |
java.lang.String[] |
getErrorDetails()
Returns the implementation-specific error details if they have been set;
otherwise
null is returned. |
PKIStatusInfo |
getPKIStatusInfo()
Returns the status information.
|
void |
setErrorCode(java.math.BigInteger errorCode)
Sets the implementation-specific error code.
|
void |
setErrorDetails(java.lang.String[] errorDetails)
Sets the set of implementation-specific error details.
|
ASN1Object |
toASN1Object()
Encodes this
ErrorMsgContent object as an
ASN1Object. |
java.lang.String |
toMessageString()
Creates a message string that represents the contents of this
ErrorMsgContent object. |
java.lang.String |
toString()
Creates a text representation of the ASN.1 structure of this
ErrorMsgContent object. |
public ErrorMsgContent(PKIStatusInfo pkiStatusInfo) throws java.lang.IllegalArgumentException
ErrorMsgContent object with the specified
component.pkiStatusInfo - indicates status informationjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic ErrorMsgContent(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
ErrorMsgContent object from an
ASN1Object.
The ASN1Object must be an ErrorMsgContent structure.
obj - the ASN.1 representation of an ErrorMsgContent structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic PKIStatusInfo getPKIStatusInfo()
public java.math.BigInteger getErrorCode()
null is returned.public java.lang.String[] getErrorDetails()
null is returned.public void setErrorCode(java.math.BigInteger errorCode)
errorCode - the errorCode componentpublic void setErrorDetails(java.lang.String[] errorDetails)
errorDetails - the errorDetails componentpublic void addErrorDetails(java.lang.String errorDetails)
If errorDetails is null, it is not added.
errorDetails - implementation-specific error details to be added to the errorDetails
componentpublic void decode(ASN1Object obj) throws CodingException, java.lang.IllegalArgumentException
ASN1Object.decode in interface ASN1Typeobj - an ASN.1 representation of an ErrorMsgContent structureCodingException - thrown if an errors occurs while decoding the ANS1Objectjava.lang.IllegalArgumentException - thrown if the parameter is nullpublic ASN1Object toASN1Object()
ErrorMsgContent object as an
ASN1Object.toASN1Object in interface ASN1Typepublic java.lang.String toString()
ErrorMsgContent object.toString in class java.lang.Objectpublic java.lang.String toMessageString()
ErrorMsgContent object.
This method can be used to create messages that can be returned in exceptions.