public interface Asn1Container
Modifier and Type | Method and Description |
---|---|
TLV |
getCurrentTLV()
Get the currentTLV
|
int |
getDecodeBytes() |
Grammar |
getGrammar()
Get the grammar
|
int |
getMaxPDUSize() |
int |
getNewTlvId()
Get a new TLV id
|
TLV |
getParentTLV() |
TLVStateEnum |
getState()
Get the current grammar state
|
ByteBuffer |
getStream()
Gets the current stream containing the bytes to decode
|
int |
getTlvId()
Get the current TLV id
|
Enum<?> |
getTransition()
Get the transition
|
void |
incrementDecodeBytes(int nb)
Increment the decodedBytes by the latest received buffer's size.
|
boolean |
isGathering() |
boolean |
isGrammarEndAllowed()
Check that we can have a end state after this transition
|
void |
rewind()
Move backward in the stream to the first byte for a given TLV.
|
void |
setCurrentTLV(TLV tlv)
Set the current TLV
|
void |
setGathering(boolean isGathering)
Set the isGathering flag
|
void |
setGrammarEndAllowed(boolean grammarEndAllowed)
Set the flag to allow a end transition
|
void |
setMaxPDUSize(int maxPDUSize)
Set the maximum PDU size.
|
void |
setParentTLV(TLV parentTLV)
Set the parent TLV
|
void |
setState(TLVStateEnum state)
Set the new current state
|
void |
setStream(ByteBuffer stream)
Stores the Stream being decoded
|
void |
setTransition(Enum<?> transition)
Update the transition from a state to another
|
void |
updateParent()
Look for the closest parent which has an expected length above 0
|
ByteBuffer getStream()
void setStream(ByteBuffer stream)
stream
- The stream being decodedTLVStateEnum getState()
void setState(TLVStateEnum state)
state
- The new stateTLV getCurrentTLV()
void setCurrentTLV(TLV tlv)
tlv
- The current TLVGrammar getGrammar()
Enum<?> getTransition()
void setTransition(Enum<?> transition)
transition
- The transition to setTLV getParentTLV()
void setParentTLV(TLV parentTLV)
parentTLV
- The new parent TLVboolean isGrammarEndAllowed()
void setGrammarEndAllowed(boolean grammarEndAllowed)
grammarEndAllowed
- true or false, depending on the next transition
being an end or not.int getNewTlvId()
int getTlvId()
int getDecodeBytes()
void incrementDecodeBytes(int nb)
nb
- The buffer size.int getMaxPDUSize()
void setMaxPDUSize(int maxPDUSize)
maxPDUSize
- The maximum PDU size (if negative or null, will be
replaced by the max integer value)void rewind()
tlv
- The TLV to rollbackvoid updateParent()
boolean isGathering()
void setGathering(boolean isGathering)
isGathering
- true to ask the Asn1Decoder to gather the data
into the container. If not set, the default value is 'false'Copyright © 2003-2014 The Apache Software Foundation. All Rights Reserved.