ch.panter.li.bi.asn.ber
Interface AsnBerDecodingContext

All Superinterfaces:
AsnBerDecodingContextInfo, AsnDecodingContextInfo
All Known Implementing Classes:
AsnBerDecodingContextImpl

public interface AsnBerDecodingContext
extends AsnBerDecodingContextInfo


Method Summary
 void addDecodingListener(AsnBerDecodingListener listener)
          Adds a listener to be notified of events when parsing with this context.
 ReadOnlyCollection<AsnBerDecodingListener> getDecodingListeners()
          Access to the registered listeners.
 AsnBerInputStream getInput()
           
 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 interface ch.panter.li.bi.asn.ber.AsnBerDecodingContextInfo
getCurrentDecodingPosition, getLastPDUInfo, getOpenTagNodes, isDecodeToFloatIfPossible, isFailFast, isListeningToEndOfContentTags, isSkipRestOfPDUInCaseOfFailure, isTruncateChildLength
 
Methods inherited from interface ch.panter.li.bi.asn.AsnDecodingContextInfo
getContextDescriptor, getOpenTags, getSyntax, isPDU
 

Method Detail

setListeningToEndOfContentTags

void setListeningToEndOfContentTags(boolean listenToEndOfContentTags)
Determines whether the listeners should be notified when end-of-content markers are encountered during decoding of indefinite length tags. default is false.

Parameters:
listenToEndOfContentTags - the new mode

setFailFast

void setFailFast(boolean failFast)
Determines whether to immediately throw an exception when inconsistent length information is detected (child tags which exceed their parents length). default is true. Turning this off is not dangerous but changes the behavior in such erroneous cases, as as many children are read as possible before exceeding the parent length.

Parameters:
failFast - the new mode

setSkipRestOfPDUInCaseOfFailure

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.

Parameters:
skipRestOfPDUInCaseOfFailure - the new mode

setTruncateChildLength

void setTruncateChildLength(boolean truncateChildLength)
Determines whether to truncate the length of children if they exceed the length of their parent. Only considered if fail-fast is false. default is true. Turning this off might be dangerous as indefinite length content might come in ...

Parameters:
truncateChildLength - the new mode

setDecodeToFloatIfPossible

void setDecodeToFloatIfPossible(boolean decodeToFloatIfPossible)
Determines whether the decoder should attempt to store REAL values in a java float if precision allows it.

Parameters:
decodeToFloatIfPossible - the new mode

getInput

AsnBerInputStream getInput()
Returns:
the stream to read from. never null but possibly closed.

push

void push(AsnBerNode node)
Pushes the given node onto the stack of open tags.

Parameters:
node - the node to push onto the stack

pop

void pop()
Pops the top of the stack


addDecodingListener

void addDecodingListener(AsnBerDecodingListener listener)
Adds a listener to be notified of events when parsing with this context.

Parameters:
listener - the listener to add

getDecodingListeners

ReadOnlyCollection<AsnBerDecodingListener> getDecodingListeners()
Access to the registered listeners.

Returns:
the (possibly empty) list of listeners.

removeDecodingListener

void removeDecodingListener(AsnBerDecodingListener listener)
Removes a listener from this context.

Parameters:
listener - the listener to remove


Copyright 2007-2007 SourceForge. All Rights Reserved.