private static boolean isDerString(DerValue value, boolean canonical) {
        if (canonical) {
            switch (value.tag) {
                case DerValue.tag_PrintableString:
                case DerValue.tag_UTF8String:
                    return true;
                default:
                    return false;
            }
        } else {
            switch (value.tag) {
                case DerValue.tag_PrintableString:
                case DerValue.tag_T61String:
                case DerValue.tag_IA5String:
                case DerValue.tag_GeneralString:
                case DerValue.tag_BMPString:
                case DerValue.tag_UTF8String:
                    return true;
                default:
                    return false;
            }
        }
    }
private static boolean isDerString ( DerValue value , boolean canonical ) { if ( canonical ) { switch ( value . tag ) { case DerValue . tag_PrintableString : case DerValue . tag_UTF8String : return true ; default : return false ; } } else { switch ( value . tag ) { case DerValue . tag_PrintableString : case DerValue . tag_T61String : case DerValue . tag_IA5String : case DerValue . tag_GeneralString : case DerValue . tag_BMPString : case DerValue . tag_UTF8String : return true ; default : return false ; } } }
/*
Return true if DerValue can be represented as a String.