public class DERBMPString extends ASN1Primitive implements ASN1String
Modifier and Type | Field and Description |
---|---|
private char[] |
string |
Constructor and Description |
---|
DERBMPString(byte[] string)
basic constructor - byte encoded string.
|
DERBMPString(char[] string) |
DERBMPString(String string)
basic constructor
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
asn1Equals(ASN1Primitive o) |
(package private) void |
encode(ASN1OutputStream out) |
(package private) int |
encodedLength() |
static DERBMPString |
getInstance(ASN1TaggedObject obj,
boolean explicit)
return a BMP String from a tagged object.
|
static DERBMPString |
getInstance(Object obj)
return a BMP String from the given object.
|
String |
getString() |
int |
hashCode() |
(package private) boolean |
isConstructed() |
String |
toString() |
equals, fromByteArray, toASN1Primitive, toDERObject, toDLObject
getEncoded, getEncoded, hasEncodedTagValue, toASN1Object
private char[] string
DERBMPString(byte[] string)
string
- the encoded BMP STRING to wrap.DERBMPString(char[] string)
public DERBMPString(String string)
string
- a String to wrap as a BMP STRING.public static DERBMPString getInstance(Object obj)
obj
- the object we want converted.IllegalArgumentException
- if the object cannot be converted.public static DERBMPString getInstance(ASN1TaggedObject obj, boolean explicit)
obj
- the tagged object holding the object we wantexplicit
- true if the object is meant to be explicitly
tagged false otherwise.IllegalArgumentException
- if the tagged object cannot
be converted.public String getString()
getString
in interface ASN1String
public int hashCode()
hashCode
in class ASN1Primitive
protected boolean asn1Equals(ASN1Primitive o)
asn1Equals
in class ASN1Primitive
boolean isConstructed()
isConstructed
in class ASN1Primitive
int encodedLength()
encodedLength
in class ASN1Primitive
void encode(ASN1OutputStream out) throws IOException
encode
in class ASN1Primitive
IOException