com.objsys.asn1j.runtime
Class Asn1MessageBuffer

java.lang.Object
  extended by com.objsys.asn1j.runtime.Asn1MessageBufferBase
      extended by com.objsys.asn1j.runtime.Asn1MessageBuffer
Direct Known Subclasses:
Asn1DecodeBuffer, Asn1EncodeBuffer

public abstract class Asn1MessageBuffer
extends Asn1MessageBufferBase

This is the base class for all of the different message buffer types. This includes the BER and PER encode and decode message buffer classes.


Field Summary
 
Fields inherited from class com.objsys.asn1j.runtime.Asn1MessageBufferBase
context, mTypeCode
 
Constructor Summary
Asn1MessageBuffer()
           
 
Method Summary
 void addNamedEventHandler(Asn1NamedEventHandler handler)
          Deprecated. Use getContext().eventDispatcher.addNamedEventHandler
 int getEventHandlerListCount()
          Deprecated. use getContext().eventDispatcher.getEventHandlerListCount()
abstract  java.io.InputStream getInputStream()
          This abstract method must be implemented by all of the derived classes.
 boolean hasEventHandlers()
          Deprecated. use getContext().eventDispatcher.hasEventHandlers()
 void invokeCharacters(java.lang.String svalue)
          This method is used by the event handling logic to invoke the 'characters' event handling method when message contents are parsed.
 void invokeEndElement(java.lang.String name, int index)
          Deprecated. use getContext().eventDispatcher.endElement(name, index)
 void invokeStartElement(java.lang.String name, int index)
          Deprecated. use getContext().eventDispatcher.startElement(name, index)
 void setEventHandlerList(Asn1MessageBuffer buffer)
          This method will set the event handler dispatcher in this object to be equal to that in the given decode buffer object (the buffers will share the dispatcher).
 
Methods inherited from class com.objsys.asn1j.runtime.Asn1MessageBufferBase
getContext, hexDump, hexDump, setKey, setTypeCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Asn1MessageBuffer

public Asn1MessageBuffer()
Method Detail

getInputStream

public abstract java.io.InputStream getInputStream()
This abstract method must be implemented by all of the derived classes. It returns an input stream object reference to the message buffer contents (i.e. the encoded data).

Returns:
Input stream object reference

addNamedEventHandler

public void addNamedEventHandler(Asn1NamedEventHandler handler)
Deprecated. Use getContext().eventDispatcher.addNamedEventHandler

This method adds a named event handler to the named event handler list for this buffer.

Parameters:
handler - Asn1NamedEventHandler object to be added

getEventHandlerListCount

public int getEventHandlerListCount()
Deprecated. use getContext().eventDispatcher.getEventHandlerListCount()

This method returns number of elements in the event handler list in this object.

Returns:
number of elements in the event handler list.

hasEventHandlers

public final boolean hasEventHandlers()
Deprecated. use getContext().eventDispatcher.hasEventHandlers()

This method returns true if, the buffer has event handlers set.

Returns:
true, if the buffer has event handlers. false, otherwise.

invokeCharacters

public void invokeCharacters(java.lang.String svalue)
This method is used by the event handling logic to invoke the 'characters' event handling method when message contents are parsed. It uses the type code last set by Asn1MessageBufferBase.setTypeCode(short)

Parameters:
svalue - Stringified representation of a parsed value field

invokeEndElement

public void invokeEndElement(java.lang.String name,
                             int index)
Deprecated. use getContext().eventDispatcher.endElement(name, index)

This method is used by the event handling logic to invoke the 'endElement' event handling method when parsing of an element within a message is completed.

Parameters:
name - Name of the element
index - Index of element if SEQUENCE OF or SET OF element

invokeStartElement

public void invokeStartElement(java.lang.String name,
                               int index)
Deprecated. use getContext().eventDispatcher.startElement(name, index)

This method is used by the event handling logic to invoke the 'startElement' event handling method when parsing of an element within a message is started.

Parameters:
name - Name of the element
index - Index of element if SEQUENCE OF or SET OF element

setEventHandlerList

public void setEventHandlerList(Asn1MessageBuffer buffer)
This method will set the event handler dispatcher in this object to be equal to that in the given decode buffer object (the buffers will share the dispatcher).

Parameters:
buffer - Decode buffer object