public static Asn1Collection createCollection(Tag tag) { if (!isCollection(tag)) { throw new IllegalArgumentException("Not collection type, tag: " + tag); } return createCollection(tag.universalTag()); }
public static Asn1Collection createCollection(Tag tag) { if (!isCollection(tag)) { throw new IllegalArgumentException("Not collection type, tag: " + tag); } return createCollection(tag.universalTag()); }
/** * Create an ASN1 type with specified tag * @param tagNo The tag number * @return ASN1 type */ public static Asn1Type create(UniversalTag tagNo) { if (Asn1Simple.isSimple(tagNo)) { return Asn1Simple.createSimple(tagNo); } else if (Asn1Collection.isCollection(tagNo)) { return Asn1Collection.createCollection(tagNo); } throw new IllegalArgumentException("Unexpected tag " + tagNo); } }
/** * Create an ASN1 type with specified tag * @param tagNo The tag number * @return ASN1 type */ public static Asn1Type create(UniversalTag tagNo) { if (Asn1Simple.isSimple(tagNo)) { return Asn1Simple.createSimple(tagNo); } else if (Asn1Collection.isCollection(tagNo)) { return Asn1Collection.createCollection(tagNo); } throw new IllegalArgumentException("Unexpected tag " + tagNo); } }
public static Asn1Type convertAsCollection(Asn1ParseResult parseResult, boolean isLazy) throws IOException { Asn1Collection value = Asn1Collection.createCollection(parseResult.tag()); value.useDefinitiveLength(parseResult.isDefinitiveLength()); value.setLazy(isLazy); Asn1Binder.bind(parseResult, value); return value; }
public static Asn1Type convertAsCollection(Asn1ParseResult parseResult, boolean isLazy) throws IOException { Asn1Collection value = Asn1Collection.createCollection(parseResult.tag()); value.useDefinitiveLength(parseResult.isDefinitiveLength()); value.setLazy(isLazy); Asn1Binder.bind(parseResult, value); return value; }