Methods Summary |
---|
void | encode(DEROutputStream out)
out.writeEncoded(UNIVERSAL_STRING, this.getOctets());
|
public boolean | equals(java.lang.Object o)
if ((o == null) || !(o instanceof DERUniversalString))
{
return false;
}
return this.getString().equals(((DERUniversalString)o).getString());
|
public static org.bouncycastle.asn1.DERUniversalString | getInstance(java.lang.Object obj)return a Universal String from the passed in object.
if (obj == null || obj instanceof DERUniversalString)
{
return (DERUniversalString)obj;
}
if (obj instanceof ASN1OctetString)
{
return new DERUniversalString(((ASN1OctetString)obj).getOctets());
}
throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
|
public static org.bouncycastle.asn1.DERUniversalString | getInstance(ASN1TaggedObject obj, boolean explicit)return a Universal String from a tagged object.
return getInstance(obj.getObject());
|
public byte[] | getOctets()
return string;
|
public java.lang.String | getString()UniversalStrings have characters which are 4 bytes long - for the
moment we just return them in Hex...
StringBuffer buf = new StringBuffer();
for (int i = 0; i != string.length; i++)
{
buf.append(table[(string[i] >>> 4) % 0xf]);
buf.append(table[string[i] & 0xf]);
}
return buf.toString();
|