@Override public void decode(ByteBuffer content) throws IOException { tagging.decode(content); }
@Override protected void decodeBody(Asn1ParseResult parseResult) throws IOException { tagging.decodeBody(parseResult); }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { tagging.encodeBody(buffer); }
public Asn1Tagging(int tagNo, T value, boolean isAppSpecific, boolean isImplicit) { super(makeTag(isAppSpecific, tagNo), value); if (value == null) { initValue(); } useImplicit(isImplicit); }
@Override protected int encodingBodyLength() throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { return value.encodingBodyLength(); } else { return value.encodingLength(); } }
@Override public void dumpWith(Asn1Dumper dumper, int indents) { Asn1Type taggedValue = getValue(); dumper.indent(indents).appendType(getClass()); dumper.append(simpleInfo()).newLine(); dumper.dumpType(indents, taggedValue); } }
@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()); } }
@Override protected int encodingBodyLength() throws IOException { return tagging.encodingBodyLength(); }
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 public boolean isBER() { return tagging.isBER(); }
@Override public boolean isCER() { return tagging.isCER(); }
@Override public boolean isDER() { return tagging.isDER(); }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.encodeBody(buffer); } else { value.encode(buffer); } }
public Asn1Tagging(int tagNo, T value, boolean isAppSpecific, boolean isImplicit) { super(makeTag(isAppSpecific, tagNo), value); if (value == null) { initValue(); } useImplicit(isImplicit); }
@Override public void dumpWith(Asn1Dumper dumper, int indents) { Asn1Type taggedValue = getValue(); dumper.indent(indents).appendType(getClass()); dumper.append(simpleInfo()).newLine(); dumper.dumpType(indents, taggedValue); } }
@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()); } }
@Override protected int encodingBodyLength() throws IOException { return tagging.encodingBodyLength(); }
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 public boolean isBER() { return tagging.isBER(); }
@Override public boolean isCER() { return tagging.isCER(); }