1 package org.bouncycastle.asn1;
6 * DER PrintableString object.
8 public class DERPrintableString
15 * basic constructor - byte encoded string.
17 public DERPrintableString(
22 this.string = new String(string, "US-ASCII");
24 catch(UnsupportedEncodingException e)
26 throw new RuntimeException("PANIC: " + e);
33 public DERPrintableString(
39 public String getString()
44 public byte[] getOctets()
48 return string.getBytes("US-ASCII");
50 catch(UnsupportedEncodingException e)
52 throw new RuntimeException("PANIC: " + e);
60 out.writeEncoded(PRINTABLE_STRING, this.getOctets());