Package org.bouncycastle.asn1.x509
Class DisplayText
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.DisplayText
- All Implemented Interfaces:
ASN1Choice
,ASN1Encodable
,Encodable
DisplayText
class, used in
CertificatePolicies
X509 V3 extensions (in policy qualifiers).
It stores a string in a chosen encoding.
DisplayText ::= CHOICE { ia5String IA5String (SIZE (1..200)), visibleString VisibleString (SIZE (1..200)), bmpString BMPString (SIZE (1..200)), utf8String UTF8String (SIZE (1..200)) }
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Constant corresponding to bmpString encoding.static final int
Constant corresponding to ia5String encoding.static final int
Constant corresponding to utf8String encoding.static final int
Constant corresponding to visibleString encoding.static final int
Describe constantDISPLAY_TEXT_MAXIMUM_SIZE
here. -
Constructor Summary
ConstructorsConstructorDescriptionDisplayText
(int type, String text) Creates a newDisplayText
instance.DisplayText
(String text) Creates a newDisplayText
instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic DisplayText
getInstance
(Object obj) static DisplayText
getInstance
(ASN1TaggedObject obj, boolean explicit) Returns the storedString
object.Method providing a primitive representation of this object suitable for encoding.Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode
-
Field Details
-
CONTENT_TYPE_IA5STRING
public static final int CONTENT_TYPE_IA5STRINGConstant corresponding to ia5String encoding.- See Also:
-
CONTENT_TYPE_BMPSTRING
public static final int CONTENT_TYPE_BMPSTRINGConstant corresponding to bmpString encoding.- See Also:
-
CONTENT_TYPE_UTF8STRING
public static final int CONTENT_TYPE_UTF8STRINGConstant corresponding to utf8String encoding.- See Also:
-
CONTENT_TYPE_VISIBLESTRING
public static final int CONTENT_TYPE_VISIBLESTRINGConstant corresponding to visibleString encoding.- See Also:
-
DISPLAY_TEXT_MAXIMUM_SIZE
public static final int DISPLAY_TEXT_MAXIMUM_SIZEDescribe constantDISPLAY_TEXT_MAXIMUM_SIZE
here.- See Also:
-
-
Constructor Details
-
DisplayText
Creates a newDisplayText
instance.- Parameters:
type
- the desired encoding type for the text.text
- the text to store. Strings longer than 200 characters are truncated.
-
DisplayText
Creates a newDisplayText
instance.- Parameters:
text
- the text to encapsulate. Strings longer than 200 characters are truncated.
-
-
Method Details
-
getInstance
-
getInstance
-
toASN1Primitive
Description copied from class:ASN1Object
Method providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitive
in interfaceASN1Encodable
- Specified by:
toASN1Primitive
in classASN1Object
- Returns:
- a primitive representation of this object.
-
getString
Returns the storedString
object.- Returns:
- the stored text as a
String
.
-