public interface Asn1Container
Modifier and Type | Method and Description |
---|---|
TLV |
getCurrentTLV()
Gets the currentTLV
|
int |
getDecodedBytes() |
Grammar |
getGrammar()
Gets the grammar
|
int |
getMaxPDUSize() |
int |
getNewTlvId()
Gets a new TLV id
|
TLV |
getParentTLV() |
TLVStateEnum |
getState()
Gets the current grammar state
|
ByteBuffer |
getStream()
Gets the current stream containing the bytes to decode
|
int |
getTlvId()
Gets the current TLV id
|
Enum<?> |
getTransition()
Gets the transition
|
void |
incrementDecodedBytes(int nb)
Increment the decodedBytes by the latest received buffer's size.
|
boolean |
isGathering() |
boolean |
isGrammarEndAllowed()
Checks 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)
Sets the current TLV
|
void |
setDecodedBytes(int decodedBytes) |
void |
setGathering(boolean isGathering)
Set the isGathering flag
|
void |
setGrammar(Grammar<?> grammar)
Sets the grammar
|
void |
setGrammarEndAllowed(boolean grammarEndAllowed)
Sets the flag to allow a end transition
|
void |
setMaxPDUSize(int maxPDUSize)
Set the maximum PDU size.
|
void |
setParentTLV(TLV parentTLV)
Sets the parent TLV
|
void |
setState(TLVStateEnum state)
Sets the new current state
|
void |
setStream(ByteBuffer stream)
Stores the Stream being decoded
|
void |
setTransition(Enum<?> transition)
Updates the transition from a state to another
|
void |
updateParent()
Update the parent's length
|
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()
void setGrammar(Grammar<?> grammar)
grammar
- The grammar to setEnum<?> 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 getDecodedBytes()
void setDecodedBytes(int decodedBytes)
decodedBytes
- The number of decoded bytes for this message.void incrementDecodedBytes(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()
void 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–2018 The Apache Software Foundation. All rights reserved.