Asn1XerOpenType Class Reference

Inheritance diagram for Asn1XerOpenType:
Asn1OpenType Asn1OctetString Asn1Type Asn1TypeIF

List of all members.

Classes

class  SaxHandler

Public Member Functions

 Asn1XerOpenType (Asn1EncodeBuffer buffer)
 Asn1XerOpenType (byte[] data, int offset, int nbytes)
 Asn1XerOpenType (byte[] data)
 Asn1XerOpenType ()
override void Decode (Asn1PerDecodeBuffer buffer)
override void Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength)
override void Encode (Asn1XerEncoder buffer)
override void Encode (Asn1XerEncoder buffer, System.String elemName)
virtual void Encode (Asn1XmlEncoder buffer)
override void Encode (Asn1XmlEncoder buffer, System.String elemName, System.String nsPrefix)
override int Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging)
virtual Asn1XerSaxHandler GetSaxHandler (bool captureOuterElem)
virtual Asn1XerSaxHandler GetSaxHandler ()
override System.String ToString ()

Protected Attributes

bool named

Detailed Description

This is a container class for holding the an ASN.1 open type value. This is a special version of the class that is only generated for the XER encoding rules. The data held in objects of this type should be UTF-8 encoded XML


Constructor & Destructor Documentation

Asn1XerOpenType (  ) 

This constructor creates an empty type that can be used in a Decode method call to receive an encoded value.

Asn1XerOpenType ( byte[]  data  ) 

This constructor initializes an open type from the given byte array. The array is assumed to contain a previously encoded message component.

Parameters:
data Byte array containing a previously encoded message component.
Asn1XerOpenType ( byte[]  data,
int  offset,
int  nbytes 
)

This constructor initializes the open type from a portion of the given byte array. A new byte array is created starting at the given offset and consisting of the given number of bytes.

Parameters:
data Byte array containing an octet string in binary form.
offset The byte offset in array at which to begin.
nbytes Number of bytes to copy from offset

This constructor initializes an open type using an encoded component. This can be used if a header (for example, a ROSE header) is being prepended to a pre-encoded component. The content of the given buffer should be XML encoded data.

Parameters:
buffer Reference to encode buffer into which component type was encoded.

Member Function Documentation

override void Decode ( Asn1PerDecodeBuffer  buffer  )  [virtual]

This operation is not allowed on this subclass.

Reimplemented from Asn1OctetString.

override void Decode ( Asn1BerDecodeBuffer  buffer,
bool  explicitTagging,
int  implicitLength 
) [virtual]

This operation converts BER-encoded data into a hexadecimal string and stores it in a <isBinary> element.

Reimplemented from Asn1OpenType.

override void Encode ( Asn1XerEncoder  buffer  )  [virtual]

This method encodes an ASN.1 open type value using the XML Encoding Rules (XER).

Parameters:
buffer Encode message buffer object

Reimplemented from Asn1Type.

override void Encode ( Asn1XerEncoder  buffer,
System.String  elemName 
) [virtual]

This method encodes an ASN.1 open type value using the XML Encoding Rules (XER).

Parameters:
buffer Encode message buffer object
elemName Element name

Reimplemented from Asn1OctetString.

virtual void Encode ( Asn1XmlEncoder  buffer  )  [virtual]

This method encodes an ASN.1 open type value using the XML Encoding as specified in the XML schema standard(asn2xsd).

Parameters:
buffer Encode message buffer object
override void Encode ( Asn1XmlEncoder  buffer,
System.String  elemName,
System.String  nsPrefix 
) [virtual]

This operation is not allowed on this subclass.

This method encodes an ASN.1 open type value using the XML Encoding as specified in the XML schema standard(asn2xsd).

Parameters:
buffer Encode message buffer object
elemName Element name
nsPrefix Element namespace value

Reimplemented from Asn1OctetString.

override int Encode ( Asn1BerEncodeBuffer  buffer,
bool  explicitTagging 
) [virtual]

Encoding Asn1XerOpenType data (which represents XML encoded data) into BER is not supported. If the content is binary (internally set during decode or encode), the data will be encoded as a regular Asn1OpenType.

Parameters:
buffer Encode message buffer object
explicit Flag indicating element is explicitly tagged
Returns:
Length of encoded component

Reimplemented from Asn1OpenType.

virtual Asn1XerSaxHandler GetSaxHandler ( bool  captureOuterElem  )  [virtual]

This method returns the Asn1XerOpenType.SaxHandler class instance used for ASN.1 XER encoding.

Parameters:
captureOuterElem Pass true if the outer element start and end tags (if present) should be captured. The outer element is the element for which startElement is called when the level is the start level. Note that this parameter is ignored if you have previously invoked one of the getSaxHandler methods on this object.
Returns:
Asn1XerOpenType.SaxHandler object
virtual Asn1XerSaxHandler GetSaxHandler (  )  [virtual]

This method returns the Asn1XerOpenType.SaxHandler class instance used for ASN.1 XER encoding. If this is the first invocation of any of the GetSaxHandler methods on this object, the returned handler will capture the outer element start/end tags. Otherwise, this will simply return the same SAX handler as previously returned.

Returns:
Asn1XerOpenType.SaxHandler object
override System.String ToString (  ) 

This method will return a string representation of the open type value. The format is the ASN.1 value format for this type..

Returns:
Stringified representation of the value

Reimplemented from Asn1OpenType.


Member Data Documentation

bool named [protected]

A flag that tells whether the element name has been printed or not.

This is used only when encoding a binary extension element, which may or may not have a name. If it does not, then we add the <isBinary> element name.