/** * Return a BMP 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 DERBMPString instance. */ public static DERBMPString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERBMPString) { return getInstance(o); } else { return new DERBMPString(ASN1OctetString.getInstance(o).getOctets()); } }
/** * return a BMP 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. */ public static DERBMPString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERBMPString) { return getInstance(o); } else { return new DERBMPString(ASN1OctetString.getInstance(o).getOctets()); } }