The root class of all ASN.1 string types including but not limited to IA5String, VisibleString, PrintableString, UTCTime, and GeneralizedTime.
Each string type is encoded as if it is declared as [UNIVERSAL x] IMPLICIT OCTET STRING where x is the tag number of the respective string type (see ITU-T Rec. X.690, paragraph 8.20.3).
There are 8 restructed string types of which 4 do not allow escape sequences, namely NumericString, PrintableString, VisibleString (ISO646String) and IA5String. TeletexString (T61String), VideotextString, GraphicString, and GeneralString allow the use of escape sequences. However, the srings must be encoded such as to use the minimum number of octets possible. All these strings use 1-octet representations; IA5String uses 2-octet representations for special characters.
Two unrestricted string types are defined in X.680, namely BMPString and UniversalString. BMPString uses a 2-octet representation per character and UniversalString uses a 4-octet representation.
Each string type represented in this package handles octets to character and character to octets conversion according to the general coding scheme of the particular string, but not neccessarily restriction to a particular character set. This is to be implemented through {@link Constraint constraints}that are added to the respective types on creation (in the constructors). Restriction of character sets is thus done on the Unicode character set used by Java.
This class implements plain 1-octet to character conversion by default. Class {@link ASN1BMPString ASN1BMPString} handles2-octet conversion and class {@link ASN1UniversalString ASN1UniversalString} handles 4-octets conversion. Withoutreference to ISO defined character encodings these implementations assume that the n-octet tuples represent the least significant bits of the Unicode characters with the corresponding bits set to zero.
@author Volker Roth
@author Stefan Endler
@version "$Id: ASN1AbstractString.java,v 1.3 2007/08/11 18:21:50 sendler Exp $"