Package net.aifusion.asn
Class TagContext
java.lang.Object
net.aifusion.asn.TagContext
Class to represent a tag context for context sensitive tags
A tag context defines the <tagNumber,tag> mapping for context sensitive tags used for encoding or decoding BER when IMPLICIT or AUTO tag definitions are being used.
A tag context defines the <tagNumber,tag> mapping for context sensitive tags used for encoding or decoding BER when IMPLICIT or AUTO tag definitions are being used.
- Author:
- Sharad Singhal
-
Constructor Summary
ConstructorDescriptionTagContext
(List<Map<Integer, Tag>> context) Create a tag context that defines the tagged types in an ASN.1 Encoding -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance()
advance the mapping to the next mapping in the ASN.1 context definitiongetExpectedTag
(int tagNumber) Get the expected Universal Tag type for a tag number in the current contextgetExpectedTag
(int tagNumber, int contextId) Get the expected Universal Tag type for a tag number in a given contextvoid
reset()
Reset the current context to the initial mapping
-
Constructor Details
-
TagContext
Create a tag context that defines the tagged types in an ASN.1 Encoding- Parameters:
context
- - context to be used within the current definition
-
-
Method Details
-
advance
public void advance()advance the mapping to the next mapping in the ASN.1 context definition -
reset
public void reset()Reset the current context to the initial mapping -
getExpectedTag
Get the expected Universal Tag type for a tag number in the current context- Parameters:
tagNumber
- - tag number to look up- Returns:
- - Tag representing expected data type. Null if no such tag found
-
getExpectedTag
Get the expected Universal Tag type for a tag number in a given context- Parameters:
tagNumber
- - tag number to look upcontextId
- - contextId to use- Returns:
- - Tag representing expected data type. Null if no such tag found
-