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()
StringBuffer buf = new StringBuffer("#");
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
ASN1OutputStream aOut = new ASN1OutputStream(bOut);
try
{
aOut.writeObject(this);
}
catch (IOException e)
{
throw new RuntimeException("internal error encoding BitString");
}
byte[] string = bOut.toByteArray();
for (int i = 0; i != string.length; i++)
{
buf.append(table[(string[i] >>> 4) % 0xf]);
buf.append(table[string[i] & 0xf]);
}
return buf.toString();
|
public int | hashCode()
return this.getString().hashCode();
|