|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.panter.li.bi.asn.ber.AsnBerDecodingContextImpl
public final class AsnBerDecodingContextImpl
Constructor Summary | |
---|---|
AsnBerDecodingContextImpl(AsnSyntax syntax,
AsnBerInputStream input)
|
Method Summary | |
---|---|
void |
addDecodingListener(AsnBerDecodingListener listener)
Adds a listener to be notified of events when parsing with this context. |
String |
getContextDescriptor()
Provides convenient (and efficient) access to the current tag context in form of a string. |
long |
getCurrentDecodingPosition()
|
ReadOnlyCollection<AsnBerDecodingListener> |
getDecodingListeners()
Access to the registered listeners. |
AsnBerInputStream |
getInput()
|
AsnBerNodeInfo |
getLastPDUInfo()
|
ReadOnlyStack<AsnBerNode> |
getOpenTagNodes()
|
ReadOnlyStack<AsnTag> |
getOpenTags()
|
AsnSyntax |
getSyntax()
|
boolean |
isDecodeToFloatIfPossible()
|
boolean |
isFailFast()
|
boolean |
isListeningToEndOfContentTags()
|
boolean |
isPDU()
Determines whether the current context is decoding a PDU. |
boolean |
isSkipRestOfPDUInCaseOfFailure()
|
boolean |
isTruncateChildLength()
|
void |
pop()
Pops the top of the stack |
void |
push(AsnBerNode node)
Pushes the given node onto the stack of open tags. |
void |
removeDecodingListener(AsnBerDecodingListener listener)
Removes a listener from this context. |
void |
setDecodeToFloatIfPossible(boolean decodeToFloatIfPossible)
Determines whether the decoder should attempt to store REAL values in a java float if precision allows it. |
void |
setFailFast(boolean failFast)
Determines whether to immediately throw an exception when inconsistent length information is detected (child tags which exceed their parents length). |
void |
setListeningToEndOfContentTags(boolean listenToEndOfContentTags)
Determines whether the listeners should be notified when end-of-content markers are encountered during decoding of indefinite length tags. |
void |
setSkipRestOfPDUInCaseOfFailure(boolean skipRestOfPDUInCaseOfFailure)
Determines whether it should be attempted to 'recover' from an erroneous PDU in the stream by skipping the rest of its contents, thereby 'seeking' to the beginning of the next pdu. |
void |
setTruncateChildLength(boolean truncateChildLength)
Determines whether to truncate the length of children if they exceed the length of their parent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsnBerDecodingContextImpl(AsnSyntax syntax, AsnBerInputStream input)
Method Detail |
---|
public final AsnSyntax getSyntax()
getSyntax
in interface AsnDecodingContextInfo
public final boolean isListeningToEndOfContentTags()
isListeningToEndOfContentTags
in interface AsnBerDecodingContextInfo
public final void setListeningToEndOfContentTags(boolean listenToEndOfContentTags)
AsnBerDecodingContext
setListeningToEndOfContentTags
in interface AsnBerDecodingContext
listenToEndOfContentTags
- the new modepublic final boolean isFailFast()
isFailFast
in interface AsnBerDecodingContextInfo
public final void setFailFast(boolean failFast)
AsnBerDecodingContext
setFailFast
in interface AsnBerDecodingContext
failFast
- the new modepublic final boolean isSkipRestOfPDUInCaseOfFailure()
isSkipRestOfPDUInCaseOfFailure
in interface AsnBerDecodingContextInfo
public final void setSkipRestOfPDUInCaseOfFailure(boolean skipRestOfPDUInCaseOfFailure)
AsnBerDecodingContext
setSkipRestOfPDUInCaseOfFailure
in interface AsnBerDecodingContext
skipRestOfPDUInCaseOfFailure
- the new modepublic final boolean isTruncateChildLength()
isTruncateChildLength
in interface AsnBerDecodingContextInfo
public final void setTruncateChildLength(boolean truncateChildLength)
AsnBerDecodingContext
setTruncateChildLength
in interface AsnBerDecodingContext
truncateChildLength
- the new modepublic final boolean isDecodeToFloatIfPossible()
isDecodeToFloatIfPossible
in interface AsnBerDecodingContextInfo
public final void setDecodeToFloatIfPossible(boolean decodeToFloatIfPossible)
AsnBerDecodingContext
setDecodeToFloatIfPossible
in interface AsnBerDecodingContext
decodeToFloatIfPossible
- the new modepublic final long getCurrentDecodingPosition()
getCurrentDecodingPosition
in interface AsnBerDecodingContextInfo
public final AsnBerInputStream getInput()
getInput
in interface AsnBerDecodingContext
public final boolean isPDU()
AsnDecodingContextInfo
isPDU
in interface AsnDecodingContextInfo
public final AsnBerNodeInfo getLastPDUInfo()
getLastPDUInfo
in interface AsnBerDecodingContextInfo
public final ReadOnlyStack<AsnTag> getOpenTags()
getOpenTags
in interface AsnDecodingContextInfo
public final ReadOnlyStack<AsnBerNode> getOpenTagNodes()
getOpenTagNodes
in interface AsnBerDecodingContextInfo
public final String getContextDescriptor()
AsnDecodingContextInfo
getContextDescriptor
in interface AsnDecodingContextInfo
public final void push(AsnBerNode node)
AsnBerDecodingContext
push
in interface AsnBerDecodingContext
node
- the node to push onto the stackpublic final void pop()
AsnBerDecodingContext
pop
in interface AsnBerDecodingContext
public final void addDecodingListener(AsnBerDecodingListener listener)
AsnBerDecodingContext
addDecodingListener
in interface AsnBerDecodingContext
listener
- the listener to addpublic final ReadOnlyCollection<AsnBerDecodingListener> getDecodingListeners()
AsnBerDecodingContext
getDecodingListeners
in interface AsnBerDecodingContext
public final void removeDecodingListener(AsnBerDecodingListener listener)
AsnBerDecodingContext
removeDecodingListener
in interface AsnBerDecodingContext
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |