Package org.mozilla.jss.asn1
Class CharacterString
java.lang.Object
org.mozilla.jss.asn1.CharacterString
- All Implemented Interfaces:
ASN1Value
- Direct Known Subclasses:
BMPString
,IA5String
,PrintableString
,TeletexString
,UniversalString
,UTF8String
An abstract base class for all character string types in ASN.1.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream ostream) Write this value's DER encoding to an output stream using its own base tag.void
encode
(Tag implicitTag, OutputStream ostream) Write this value's DER encoding to an output stream using an implicit tag.abstract Tag
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.char[]
Converts this ASN.1 character string to an array of Java characters.toString()
Converts this ASN.1 character string to a Java String.
-
Constructor Details
-
CharacterString
- Throws:
CharConversionException
-
CharacterString
- Throws:
CharConversionException
-
-
Method Details
-
getTag
Description copied from interface:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
toString
Converts this ASN.1 character string to a Java String. -
toCharArray
public char[] toCharArray()Converts this ASN.1 character string to an array of Java characters.- Returns:
- ASN.1 character string as character array.
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using its own base tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
Description copied from interface:ASN1Value
Write this value's DER encoding to an output stream using an implicit tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicitTag
- Implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-