Asn1OpenType Class Reference

Inheritance diagram for Asn1OpenType:
Asn1OctetString Asn1Type Asn1TypeIF Asn1ChoiceExt Asn1XerOpenType

List of all members.

Public Member Functions

 Asn1OpenType (Asn1EncodeBuffer buffer)
 Asn1OpenType (byte[] data, int offset, int nbytes)
 Asn1OpenType (byte[] data)
 Asn1OpenType ()
override void Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength)
override void Encode (Asn1PerOutputStream outs)
override void Encode (Asn1BerOutputStream outs, bool explicitTagging)
void encode (Asn1XerEncoder buffer, String elemName)
void encode (Asn1XmlEncoder buffer, String elemName, String nsPrefix)
override void Encode (Asn1PerEncodeBuffer buffer)
override int Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging)
override System.String ToString ()

Protected Attributes

internal Asn1EncodeBuffer mEncodeBuffer
internal int mLength

Detailed Description

This is a container class for holding the an ASN.1 open type value.


Constructor & Destructor Documentation

Asn1OpenType (  ) 

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

Asn1OpenType ( 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.
Asn1OpenType ( 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 offset in array at which to begin copy.
nbytes Number of bytes to copy from target array
Asn1OpenType ( Asn1EncodeBuffer  buffer  ) 

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.

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

Member Function Documentation

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

This method decodes an ASN.1 open type value.

Parameters:
buffer Decode message buffer object
explicitTagging Flag indicating element is explicitly tagged
implicitLength Length of contents if implicit

Reimplemented from Asn1OctetString.

Reimplemented in Asn1ChoiceExt, and Asn1XerOpenType.

override void Encode ( Asn1PerOutputStream  outs  )  [virtual]

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

Also throws any exception thrown by the underlying Asn1PerOutputStream.

Parameters:
outs PER Output Stream object
Exceptions:
Asn1Exception Thrown, if operation is failed.

Reimplemented from Asn1OctetString.

Reimplemented in Asn1ChoiceExt.

override void Encode ( Asn1BerOutputStream  outs,
bool  explicitTagging 
) [virtual]

This method encodes and writes to the stream an ASN.1 open type value including the UNIVERSAL tag value and length if explicit tagging is specified. This overloaded version uses the Basic Encoding Rules (BER).

Throws, Exception thrown by C# System.IO.Stream for I/O error

Parameters:
outs BER Output Stream object
explicitTagging Flag indicating explicit tagging should be done
Exceptions:
Asn1Exception Thrown, if operation is failed.

Reimplemented from Asn1OctetString.

Reimplemented in Asn1ChoiceExt.

void encode ( Asn1XerEncoder  buffer,
String  elemName 
)

This method encodes an ASN.1 open type value using the XML Encoding as specified in the XML schema standard(asn2xsd). The value is encoded as an XML comment, since the element name will be unknown.

Parameters:
buffer Encode message buffer object
elemName Ignored
void encode ( Asn1XmlEncoder  buffer,
String  elemName,
String  nsPrefix 
)

This method encodes an ASN.1 open type value using the XML Encoding as specified in the XML schema standard(asn2xsd). The value is encoded as an XML comment, since the element name will be unknown.

Parameters:
buffer Encode message buffer object
elemName Ignored
nsPrefix Ignored
override void Encode ( Asn1PerEncodeBuffer  buffer  )  [virtual]

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

Parameters:
buffer Encode message buffer object

Reimplemented from Asn1OctetString.

Reimplemented in Asn1ChoiceExt.

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

This method encodes an ASN.1 open type value. The value is assumed to be an already-encoded message component and will be copied to the encoded buffer. An optimization is available in which no copy will performed if the encoded component is already present in the encode buffer. This is done if the form of constructor specifiying only a component length is used.

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

Reimplemented from Asn1OctetString.

Reimplemented in Asn1ChoiceExt, and Asn1XerOpenType.

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 Asn1OctetString.

Reimplemented in Asn1XerOpenType.


Member Data Documentation

internal Asn1EncodeBuffer mEncodeBuffer [protected]

The encode buffer into which component type will be encoded. /p>

internal int mLength [protected]

Length of the pre-encoded component. /p>