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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byte[]
private char[]
(package private) static final Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]
void
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.(package private) abstract CharConverter
private byte[]
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.
-
Field Details
-
FORM
-
chars
private char[] chars -
cachedContents
private byte[] cachedContents
-
-
Constructor Details
-
CharacterString
- Throws:
CharConversionException
-
CharacterString
- Throws:
CharConversionException
-
-
Method Details
-
getCharConverter
-
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.
-
getEncodedContents
private byte[] getEncodedContents() -
computeContents
- Throws:
CharConversionException
-
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.
-