@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.encodeBody(buffer); } else { value.encode(buffer); } }
@Override public byte[] encode() throws IOException { int len = encodingLength(); ByteBuffer byteBuffer = ByteBuffer.allocate(len); encode(byteBuffer); byteBuffer.flip(); return byteBuffer.array(); }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable value = (Asn1Encodeable) getValue(); if (isImplicit()) { value.encodeBody(buffer); } else { value.encode(buffer); } }
@Override public byte[] encode() throws IOException { int len = encodingLength(); ByteBuffer byteBuffer = ByteBuffer.allocate(len); encode(byteBuffer); byteBuffer.flip(); return byteBuffer.array(); }
@Override public void taggedEncode(ByteBuffer buffer, TaggingOption taggingOption) throws IOException { Tag taggingTag = taggingOption.getTag(!isPrimitive()); Asn1Util.encodeTag(buffer, taggingTag); int taggingBodyLen = taggingOption.isImplicit() ? encodingBodyLength() : encodingLength(); Asn1Util.encodeLength(buffer, taggingBodyLen); if (taggingOption.isImplicit()) { encodeBody(buffer); } else { encode(buffer); } }
@Override public void encode(ByteBuffer buffer) throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (!isBlindlyDecoded) { if (decodeInfo.isTagged()) { TaggingOption taggingOption = decodeInfo.getTaggingOption(); theValue.taggedEncode(buffer, taggingOption); } else { theValue.encode(buffer); } } else { theValue.encode(buffer); } } }
@Override public void taggedEncode(ByteBuffer buffer, TaggingOption taggingOption) throws IOException { Tag taggingTag = taggingOption.getTag(!isPrimitive()); Asn1Util.encodeTag(buffer, taggingTag); int taggingBodyLen = taggingOption.isImplicit() ? encodingBodyLength() : encodingLength(); Asn1Util.encodeLength(buffer, taggingBodyLen); if (taggingOption.isImplicit()) { encodeBody(buffer); } else { encode(buffer); } }
@Override public void encode(ByteBuffer buffer) throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (!isBlindlyDecoded) { if (decodeInfo.isTagged()) { TaggingOption taggingOption = decodeInfo.getTaggingOption(); theValue.taggedEncode(buffer, taggingOption); } else { theValue.encode(buffer); } } else { theValue.encode(buffer); } } }
@Override public void encode(ByteBuffer buffer) throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); theValue.taggedEncode(buffer, taggingOption); } else { theValue.encode(buffer); } } }
@Override public void encode(ByteBuffer buffer) throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); theValue.taggedEncode(buffer, taggingOption); } else { theValue.encode(buffer); } } }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); theValue.taggedEncode(buffer, taggingOption); } else { theValue.encode(buffer); } } }
@Override protected void encodeBody(ByteBuffer buffer) throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); theValue.taggedEncode(buffer, taggingOption); } else { theValue.encode(buffer); } } }
@Override public byte[] encode() throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); return theValue.taggedEncode(taggingOption); } else { return theValue.encode(); } } return null; }
@Override public byte[] encode() throws IOException { Asn1Encodeable theValue = (Asn1Encodeable) getValue(); if (theValue != null) { if (chosenField.isTagged()) { TaggingOption taggingOption = chosenField.getTaggingOption(); return theValue.taggedEncode(taggingOption); } else { return theValue.encode(); } } return null; }