org.bouncycastle.asn1
public class DERPrintableString extends ASN1Object implements DERString
| Constructor Summary | |
|---|---|
| DERPrintableString(byte[] string)
basic constructor - byte encoded string. | |
| DERPrintableString(String string)
basic constructor - this does not validate the string | |
| DERPrintableString(String string, boolean validate)
Constructor with optional validation.
| |
| Method Summary | |
|---|---|
| static DERPrintableString | getInstance(Object obj)
return a printable string from the passed in object.
|
| static DERPrintableString | getInstance(ASN1TaggedObject obj, boolean explicit)
return a Printable String from a tagged object.
|
| byte[] | getOctets() |
| String | getString() |
| int | hashCode() |
| static boolean | isPrintableString(String str)
return true if the passed in String can be represented without
loss as a PrintableString, false otherwise.
|
| String | toString() |
Parameters: string the base string to wrap. validate whether or not to check the string.
Throws: IllegalArgumentException if validate is true and the string contains characters that should not be in a PrintableString.
Throws: IllegalArgumentException if the object cannot be converted.
Parameters: obj the tagged object holding the object we want explicit true if the object is meant to be explicitly tagged false otherwise.
Throws: IllegalArgumentException if the tagged object cannot be converted.
Returns: true if in printable set, false otherwise.