break; case CONTENT_TYPE_VISIBLESTRING: contents = new DERVisibleString(text); break; case CONTENT_TYPE_BMPSTRING:
break; case CONTENT_TYPE_VISIBLESTRING: contents = new DERVisibleString(text); break; case CONTENT_TYPE_BMPSTRING:
/** * Return a Visible String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. * @return a DERVisibleString instance, or null */ public static DERVisibleString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERVisibleString) { return getInstance(o); } else { return new DERVisibleString(ASN1OctetString.getInstance(o).getOctets()); } }
/** * Return a Visible String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. * @return a DERVisibleString instance, or null */ public static DERVisibleString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERVisibleString) { return getInstance(o); } else { return new DERVisibleString(ASN1OctetString.getInstance(o).getOctets()); } }
return new DERUTF8String(defIn.toByteArray()); case VISIBLE_STRING: return new DERVisibleString(defIn.toByteArray()); default: throw new IOException("unknown tag " + tagNo + " encountered");
return new DERUTF8String(defIn.toByteArray()); case VISIBLE_STRING: return new DERVisibleString(defIn.toByteArray()); case GRAPHIC_STRING: return new DERGraphicString(defIn.toByteArray());