@Override protected void decodeBody(Asn1ParseResult parseResult) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.decodeBody(parseResult); } else { Asn1Container container = (Asn1Container) parseResult; Asn1ParseResult body = container.getChildren().get(0); value.decode(body); } }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.encodeBody(buffer); } else { value.encode(buffer); } }
@Override protected void decodeBody(Asn1ParseResult parseResult) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.decodeBody(parseResult); } else { Asn1Container container = (Asn1Container) parseResult; Asn1ParseResult body = container.getChildren().get(0); value.decode(body); } }
@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 { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { return value.encodingBodyLength(); } else { return value.encodingLength(); } }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.encodeBody(buffer); } else { value.encode(buffer); } }
@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 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 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 dumpWith(Asn1Dumper dumper, int indents) { Asn1Type taggedValue = getValue(); dumper.indent(indents).appendType(getClass()); dumper.append(simpleInfo()).newLine(); dumper.dumpType(indents, taggedValue); } }