Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Open Source
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

Asn1OpenType Class Reference

Inheritance diagram for Asn1OpenType:

Asn1OctetString Asn1Type Asn1TypeIF Asn1ChoiceExt Asn1XerOpenType List of all members.

Detailed Description

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


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)
override void Encode (Asn1PerEncodeBuffer buffer)
override int Encode (Asn1BerEncodeBuffer buffer, bool explicitTagging)
override System.String ToString ()

Protected Attributes

internal Asn1EncodeBuffer mEncodeBuffer
internal int mLength
internal bool mTextEncoding


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.

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, and Asn1XerOpenType.

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.


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>

internal bool mTextEncoding [protected]
 

Use UTF encoding rule for string conversion. /p>


Copyright © 1997-2005 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 18 Nov 2005.
ASN1C C# Runtime Library, 5.8