public class Asn1Choice extends AbstractAsn1Type<Asn1Type> implements Asn1Dumpable
Asn1Type.EncodingType| Constructor and Description |
|---|
Asn1Choice(Asn1FieldInfo[] fieldInfos) |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(Asn1ParseResult parseResult) |
void |
decode(ByteBuffer content)
Decode the content bytes into this type.
|
protected void |
decodeBody(Asn1ParseResult parseResult) |
void |
dumpWith(Asn1Dumper dumper,
int indents) |
byte[] |
encode()
Encode the type, by recursively.
|
void |
encode(ByteBuffer buffer)
Encode the type, by recursively, using the provided buffer.
|
protected void |
encodeBody(ByteBuffer buffer) |
protected int |
encodingBodyLength() |
int |
encodingLength()
Get length of encoding bytes by just calculating without real encoding.
|
protected <T extends Asn1Type> |
getChoiceValueAs(EnumType index,
Class<T> t) |
protected byte[] |
getChoiceValueAsOctets(EnumType index) |
boolean |
matchAndSetValue(Tag tag) |
protected void |
setChoiceValue(EnumType index,
Asn1Type value) |
protected void |
setChoiceValueAsOctets(EnumType index,
byte[] bytes) |
Tag |
tag() |
getValue, setValue, toStringdecode, encodingHeaderLength, getBodyLength, getHeaderLength, isBER, isCER, isDefinitiveLength, isDER, isImplicit, isPrimitive, taggedDecode, taggedDecode, taggedDecode, taggedEncode, taggedEncode, taggedEncodingLength, useBER, useCER, useDefinitiveLength, useDER, useImplicit, usePrimitiveisAppSpecific, isCollection, isContextSpecific, isEOC, isNull, isSimple, isTagSpecific, isUniversal, simpleInfo, tagFlags, tagNopublic Asn1Choice(Asn1FieldInfo[] fieldInfos)
public Tag tag()
tag in interface Asn1Typetag in class Asn1Objectpublic boolean matchAndSetValue(Tag tag)
public byte[] encode()
throws IOException
Asn1Typeencode in interface Asn1Typeencode in class Asn1EncodeableIOExceptionpublic void encode(ByteBuffer buffer) throws IOException
Asn1Typeencode in interface Asn1Typeencode in class Asn1Encodeablebuffer - The byte bufferIOExceptionpublic int encodingLength()
Asn1TypeencodingLength in interface Asn1TypeencodingLength in class Asn1Encodeableprotected int encodingBodyLength()
encodingBodyLength in class Asn1Encodeableprotected void encodeBody(ByteBuffer buffer) throws IOException
encodeBody in class Asn1EncodeableIOExceptionpublic void decode(ByteBuffer content) throws IOException
Asn1Typedecode in interface Asn1Typedecode in class Asn1Encodeablecontent - The content bytesIOException - epublic void decode(Asn1ParseResult parseResult) throws IOException
decode in class Asn1EncodeableIOExceptionprotected void decodeBody(Asn1ParseResult parseResult) throws IOException
decodeBody in class Asn1EncodeableIOExceptionprotected void setChoiceValueAsOctets(EnumType index, byte[] bytes)
protected byte[] getChoiceValueAsOctets(EnumType index)
public void dumpWith(Asn1Dumper dumper, int indents)
dumpWith in interface Asn1DumpableCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.