@Override public void decode(ByteBuffer content) throws IOException { chosenField = null; setValue(null); super.decode(content); }
public void setValue(T value) { resetBodyLength(); this.value = value; if (value instanceof Asn1Encodeable) { ((Asn1Encodeable) value).outerEncodeable = this; } }
@Override public String toString() { return tag().typeStr(); } }
@Override public int encodingLength() { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); return theValue.taggedEncodingLength(taggingOption); } else { return theValue.encodingLength(); } } return super.encodingLength(); }
@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 int encodingLength() { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); return theValue.taggedEncodingLength(taggingOption); } else { return theValue.encodingLength(); } } return super.encodingLength(); }
@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 String toString() { return tag().typeStr(); } }
@Override public void decode(ByteBuffer content) throws IOException { setValue(null); super.decode(content); }
@Override public int encodingLength() { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (!isBlindlyDecoded) { if (decodeInfo.isTagged()) { TaggingOption taggingOption = decodeInfo.getTaggingOption(); return theValue.taggedEncodingLength(taggingOption); } else { return theValue.encodingLength(); } } else { return theValue.encodingLength(); } } return super.encodingLength(); }
public void setValue(T value) { resetBodyLength(); this.value = value; if (value instanceof Asn1Encodeable) { ((Asn1Encodeable) value).outerEncodeable = this; } }
@Override public Tag tag() { if (getValue() != null) { return getValue().tag(); } else if (chosenField != null) { return chosenField.getFieldTag(); } return super.tag(); }
@Override public void decode(ByteBuffer content) throws IOException { setValue(null); super.decode(content); }
@Override public int encodingLength() { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (!isBlindlyDecoded) { if (decodeInfo.isTagged()) { TaggingOption taggingOption = decodeInfo.getTaggingOption(); return theValue.taggedEncodingLength(taggingOption); } else { return theValue.encodingLength(); } } else { return theValue.encodingLength(); } } return super.encodingLength(); }
@Override public Tag tag() { if (getValue() != null) { return getValue().tag(); } else if (parseResult != null) { return parseResult.tag(); } return super.tag(); }
@Override public void decode(ByteBuffer content) throws IOException { chosenField = null; setValue(null); super.decode(content); }
@Override public Tag tag() { if (getValue() != null) { return getValue().tag(); } else if (parseResult != null) { return parseResult.tag(); } return super.tag(); }
@Override public Tag tag() { if (getValue() != null) { return getValue().tag(); } else if (chosenField != null) { return chosenField.getFieldTag(); } return super.tag(); }