switch (type) {
case CONTENT_TYPE_IA5STRING:
contents = (DERString)new DERIA5String (text);
break;
case CONTENT_TYPE_UTF8STRING:
contents = (DERString)new DERUTF8String(text);
break;
case CONTENT_TYPE_VISIBLESTRING:
contents = (DERString)new DERVisibleString(text);
break;
case CONTENT_TYPE_BMPSTRING:
contents = (DERString)new DERBMPString(text);
break;
default:
contents = (DERString)new DERUTF8String(text);
break;
}
}