@Override public void useImplicit(boolean isImplicit) { super.useImplicit(isImplicit); if (!isImplicit) { //In effect, explicitly tagged types are structured types consisting // of one component, the underlying type. usePrimitive(false); } else { usePrimitive(getValue().isPrimitive()); } }
public Asn1TaggingCollection(int taggingTagNo, Asn1FieldInfo[] tags, boolean isAppSpecific, boolean isImplicit) { super(makeTag(isAppSpecific, taggingTagNo)); this.tagged = createTaggedCollection(tags); setValue(tagged); this.tagging = new Asn1Tagging<>(taggingTagNo, tagged, isAppSpecific, isImplicit); }
@Override protected int encodingBodyLength() throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { return value.encodingBodyLength(); } else { return value.encodingLength(); } }
protected String getFieldAsObjId(EnumType index) { Asn1ObjectIdentifier objId = getFieldAs(index, Asn1ObjectIdentifier.class); if (objId != null) { return objId.getValue(); } return null; }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.encodeBody(buffer); } else { value.encode(buffer); } }
@Override protected int encodingBodyLength() throws IOException { List<Asn1Type> valueItems = getValue(); int allLen = 0; for (Asn1Type item : valueItems) { if (item != null) { allLen += item.encodingLength(); } } return allLen; }
@Override public void setValue(byte[] value) { super.setValue(value); value2Flags(); }
protected byte[] getFieldAsOctets(EnumType index) { Asn1OctetString value = getFieldAs(index, Asn1OctetString.class); if (value != null) { return value.getValue(); } return null; }
protected byte[] getChoiceValueAsOctets(EnumType index) { Asn1OctetString value = getChoiceValueAs(index, Asn1OctetString.class); if (value != null) { return value.getValue(); } return null; }
@Override public void useImplicit(boolean isImplicit) { super.useImplicit(isImplicit); if (!isImplicit) { //In effect, explicitly tagged types are structured types consisting // of one component, the underlying type. usePrimitive(false); } else { usePrimitive(getValue().isPrimitive()); } }
public Asn1TaggingCollection(int taggingTagNo, Asn1FieldInfo[] tags, boolean isAppSpecific, boolean isImplicit) { super(makeTag(isAppSpecific, taggingTagNo)); this.tagged = createTaggedCollection(tags); setValue(tagged); this.tagging = new Asn1Tagging<>(taggingTagNo, tagged, isAppSpecific, isImplicit); }
@Override protected int encodingBodyLength() throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { return value.encodingBodyLength(); } else { return value.encodingLength(); } }
@Override protected int encodingBodyLength() throws IOException { List<Asn1Type> valueItems = getValue(); int allLen = 0; for (Asn1Type item : valueItems) { if (item != null) { allLen += item.encodingLength(); } } return allLen; }
@Override public void setValue(byte[] value) { super.setValue(value); value2Flags(); }
protected byte[] getFieldAsOctets(EnumType index) { Asn1OctetString value = getFieldAs(index, Asn1OctetString.class); if (value != null) { return value.getValue(); } return null; }