Asn1BerMessageDumpHandler Class Reference

Inheritance diagram for Asn1BerMessageDumpHandler:
Asn1TaggedEventHandler

List of all members.

Public Member Functions

 Asn1BerMessageDumpHandler (System.IO.StreamWriter outs)
 Asn1BerMessageDumpHandler ()
virtual void Contents (byte[] data)
virtual void EndElement (Asn1Tag tag)
virtual void StartElement (Asn1Tag tag, int len, byte[] tagLenBytes)

Detailed Description

This class implements the Asn1EventHandler interface to provide a formatted dump of a BER message to the given print output stream. An object of this type is used in conjunction with the Asn1BerDecodeBuffer Parse method to generically parse a BER message.


Constructor & Destructor Documentation

The constructor will print the dump result on the standard output stream.

Asn1BerMessageDumpHandler ( System.IO.StreamWriter  outs  ) 

The constructor sets the StreamWriter object to which the formatted output should be written.

Parameters:
outs Output stream for formatted data

Member Function Documentation

virtual void Contents ( byte[]  data  )  [virtual]

This method is invoked after each contents field is parsed. It formats and prints the contents in a hex/ascii format.

Parameters:
data Array containing the encoded contents bytes

Implements Asn1TaggedEventHandler.

virtual void EndElement ( Asn1Tag  tag  )  [virtual]

This method is invoked after parsing is complete on each tag/length/value (TLV) in the message.

Parameters:
tag Array containing the encoded contents bytes

Implements Asn1TaggedEventHandler.

virtual void StartElement ( Asn1Tag  tag,
int  len,
byte[]  tagLenBytes 
) [virtual]

This method is invoked after each tag/length value is parsed in the message being dumped. It formats and prints the tag/length values.

Parameters:
tag Parsed tag value
len Parsed length value
tagLenBytes Array containing the encoded tag/length bytes

Implements Asn1TaggedEventHandler.