|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object codec.asn1.ASN1AbstractType codec.asn1.ASN1AbstractString codec.asn1.ASN1BMPString
public class ASN1BMPString
Represents a BMPString. This string type uses a 2-octet
encoding of characters. For more details on strings see
ASN1AbstractString
.
ASN1AbstractString
Constructor Summary | |
---|---|
ASN1BMPString()
|
|
ASN1BMPString(String s)
Creates an instance with the given string value. |
Method Summary | |
---|---|
String |
convert(byte[] b)
Converts the given byte array to a string by filling up each consecutive 2-byte-tuple with 0's to the size of the Unicode characters. |
byte[] |
convert(String s)
Converts the given string to a byte array by chopping away all but the two least significant byte of each character. |
int |
convertedLength(String s)
Returns the number of bytes required to store the converted string. |
int |
getTag()
Returns the ASN.1 tag of this type which is [UNIVERSAL 30 ]. |
Methods inherited from class codec.asn1.ASN1AbstractString |
---|
decode, encode, getString, getValue, setString, setString0, toString |
Methods inherited from class codec.asn1.ASN1AbstractType |
---|
checkConstraints, getConstraint, getTagClass, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface codec.asn1.ASN1Type |
---|
checkConstraints, getConstraint, getTagClass, isExplicit, isOptional, isType, setConstraint, setExplicit, setOptional |
Constructor Detail |
---|
public ASN1BMPString()
public ASN1BMPString(String s)
constraint
checks.
This constructor calls setString
to set the string value.
The
- string value.Method Detail |
---|
public int getTag()
30
].
getTag
in interface ASN1Type
getTag
in class ASN1AbstractType
public String convert(byte[] b) throws ASN1Exception
convert
in interface ASN1String
convert
in class ASN1AbstractString
b
- The byte array to convert.
ASN1Exception
public byte[] convert(String s) throws ASN1Exception
convert
in interface ASN1String
convert
in class ASN1AbstractString
s
- The string to convert.
ASN1Exception
public int convertedLength(String s) throws ASN1Exception
convertedLength
in interface ASN1String
convertedLength
in class ASN1AbstractString
s
- The string.
ASN1Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |