|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The common interface of all ASN.1 string types. This interface specifies
setter and getter methods for string values and methods for string to octet
and octet to string conversion. See ASN1AbstractString for details on strings.
ASN1AbstractString| Method Summary | |
String |
convert(byte[] b)
Converts the given byte array to a string. |
byte[] |
convert(String s)
Converts the given string to a byte array. |
int |
convertedLength(String s)
Returns the number of octets required to encode the given string according to the basic encoding scheme of this type. |
String |
getString()
Returns the represented string value. |
void |
setString(String s)
Sets the string value. |
| Methods inherited from interface codec.asn1.ASN1Type |
checkConstraints, decode, encode, getConstraint, getTag, getTagClass, getValue, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional |
| Method Detail |
public String getString()
public void setString(String s)
throws ConstraintException
s - The string value.
public String convert(byte[] b)
throws ASN1Exception
b - The byte array to convert.
public byte[] convert(String s)
throws ASN1Exception
s - The string to convert.
public int convertedLength(String s)
throws ASN1Exception
BMPStrings this is twice the number of characters
and for UniversalStrings it is four times the
number of characters in the string.
The number returned must equal the number returned by the method call
convert(s). This method is required
for DER encoding of string types in order to determine the number of
octets required for encoding the given string. For BER encoding this
method is not and the encoding of the string may be broken up into
consecutive OCTET STRINGS.
s - The string whose encoding length is determined.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||