Asn18BitCharString Class Reference

Inheritance diagram for Asn18BitCharString:
Asn1CharString Asn1Type Asn1TypeIF Asn1AbstractTime Asn1Date Asn1DateTime Asn1Duration Asn1IA5String Asn1NumericString Asn1PrintableString Asn1Time Asn1TimeOfDay Asn1VisibleString

List of all members.

Public Member Functions

void Decode (Asn1OerDecodeBuffer buffer, int length)
override void Decode (Asn1OerDecodeBuffer buffer)
virtual void Decode (Asn1PerDecodeBuffer buffer, Asn1CharSet charSet, long lower, long upper)
virtual void Decode (Asn1PerDecodeBuffer buffer, Asn1CharSet charSet)
override void Decode (Asn1PerDecodeBuffer buffer)
virtual void Encode (Asn1OerEncodeBuffer buffer, bool withLength)
override void Encode (Asn1OerEncodeBuffer buffer)
virtual void Encode (Asn1PerOutputStream outs, Asn1CharSet charSet, long lower, long upper)
virtual void Encode (Asn1PerOutputStream outs, Asn1CharSet charSet)
override void Encode (Asn1PerOutputStream outs)
virtual void Encode (Asn1PerEncodeBuffer buffer, Asn1CharSet charSet, long lower, long upper)
virtual void Encode (Asn1PerEncodeBuffer buffer, Asn1CharSet charSet)
override void Encode (Asn1PerEncodeBuffer buffer)

Public Attributes

const int BITSPERCHAR_A = 8
const int BITSPERCHAR_U = 7

Protected Member Functions

internal Asn18BitCharString (System.String data, short typeCode)
internal Asn18BitCharString (short typeCode)

Detailed Description

This is an abstract base class for holding the ASN.1 8-bit character string types (IA5String, VisibleString, PrintableString, etc.).


Constructor & Destructor Documentation

internal Asn18BitCharString ( short  typeCode  )  [protected]

The default constructor creates an empty string object.

Parameters:
typeCode Universal ID code for ASN.1 character string
internal Asn18BitCharString ( System.String  data,
short  typeCode 
) [protected]

This version of the constructor can be used to set the string mValue member variable to the given string.

Parameters:
data Character string
typeCode Universal ID code for ASN.1 character string

Member Function Documentation

void Decode ( Asn1OerDecodeBuffer  buffer,
int  length 
)

<summmary> Decode the value in accordance with OER.

This class's implementation decodes a string of the given length. This method is not virtual as I don't see any reason for overriding it. </summmary>

Parameters:
length Length of string to decode
override void Decode ( Asn1OerDecodeBuffer  buffer  )  [virtual]

Decode the value in accordance with OER.

This class's implementation decodes the string with a length determinant. If a subclass should be decoded without a length determinant, it should override this method to invoke Decode(buffer, length). Subclasses may override this to add constraint checks after invoking this method to decode the string.

Reimplemented from Asn1Type.

Reimplemented in Asn1Date, Asn1DateTime, Asn1Duration, and Asn1TimeOfDay.

virtual void Decode ( Asn1PerDecodeBuffer  buffer,
Asn1CharSet  charSet,
long  lower,
long  upper 
) [virtual]

This overloaded version of the Decode method decodes an ASN.1 character string value in accordance with the packed encoding rules (PER). This version of the method assumes a size constraint is present and an optional permitted alphabet constraint.

The decoded result is stored in the public mValue member variable in the Asn1CharString base class.

Parameters:
buffer Decode message buffer object
charSet Object representing permitted alphabet constraint character set (optional)
lower Effective size constraint lower bound
upper Effective size constraint upper bound
virtual void Decode ( Asn1PerDecodeBuffer  buffer,
Asn1CharSet  charSet 
) [virtual]

This method decodes an ASN.1 character string value in accordance with the packed encoding rules (PER). This version of the method assumes no size constraints but does allow a permitted alphabet character set to be specified. Decoded characters are assigned as-is to the output string. The decoded result is stored in the public mValue member variable in the Asn1CharString base class.

Parameters:
buffer Decode message buffer object
charSet Object representing permitted alphabet constraint character set (optional)
override void Decode ( Asn1PerDecodeBuffer  buffer  )  [virtual]

This method decodes an ASN.1 character string value in accordance with the packed encoding rules (PER). This version of the method assumes no permitted alphabet or size constraints. Decoded characters are assigned as-is to the output string. The decoded result is stored in the public mValue member variable in the Asn1CharString base class.

Parameters:
buffer Decode message buffer object

Reimplemented from Asn1Type.

Reimplemented in Asn1AbstractTime, Asn1Date, Asn1DateTime, Asn1Duration, Asn1NumericString, and Asn1TimeOfDay.

virtual void Encode ( Asn1OerEncodeBuffer  buffer,
bool  withLength 
) [virtual]

Encode the string, with or without a length determinant.

Subclasses may override this (e.g. to add constraint checks) and invoke this method to perform the encoding.

Parameters:
withLength true if a length determinant should be encoded.
override void Encode ( Asn1OerEncodeBuffer  buffer  )  [virtual]

Encode the value in accordance with OER.

This class's implementation invokes Encode(buffer, true) to encode the string with a length determinant. If a subclass should be encoded without a length determinant, it should override this to invoke Encode(buffer, false).

Reimplemented from Asn1Type.

Reimplemented in Asn1Date, Asn1DateTime, Asn1Duration, and Asn1TimeOfDay.

virtual void Encode ( Asn1PerOutputStream  outs,
Asn1CharSet  charSet,
long  lower,
long  upper 
) [virtual]

This overloaded version of the encode method encodes an ASN.1 character string value directly into the stream, in accordance with the packed encoding rules (PER). This version of the method assumes a size constraint is present and an optional permitted alphabet constraint.

The value to encode is stored in the public mValue member variable in the Asn1CharString base class.

Also throws any exception thrown by the Asn1PerOutputStream.

Parameters:
outs PER Encode message stream object
charSet Object representing permitted alphabet constraint character set (optional)
lower Effective size constraint lower bound
upper Effective size constraint upper bound
Exceptions:
Asn1Exception Thrown, if operation is failed.
virtual void Encode ( Asn1PerOutputStream  outs,
Asn1CharSet  charSet 
) [virtual]

This method encodes an ASN.1 character string value in accordance with the packed encoding rules (PER) directly into the stream. This version of the method assumes no size constraints but does allow a permitted alphabet character set to be specified.

The value to encode is stored in the public mValue member variable in the Asn1CharString base class.

Also throws any exception thrown by the Asn1PerOutputStream.

Parameters:
outs PER Encode message stream object
charSet Object representing permitted alphabet constraint character set (optional)
Exceptions:
Asn1Exception Thrown, if operation is failed.
override void Encode ( Asn1PerOutputStream  outs  )  [virtual]

This method encodes an ASN.1 character string value in accordance with the packed encoding rules (PER) directly into the stream. This version of the method assumes no permitted alphabet or size constraints.

The value to encode is stored in the public mValue member variable in the Asn1CharString base class.

Also throws any exception thrown by the Asn1PerOutputStream.

Parameters:
outs PER Encode message stream object
Exceptions:
Asn1Exception Thrown, if operation is failed.

Reimplemented from Asn1Type.

Reimplemented in Asn1AbstractTime, Asn1Date, Asn1DateTime, Asn1Duration, and Asn1TimeOfDay.

virtual void Encode ( Asn1PerEncodeBuffer  buffer,
Asn1CharSet  charSet,
long  lower,
long  upper 
) [virtual]

This overloaded version of the encode method encodes an ASN.1 character string value in accordance with the packed encoding rules (PER). This version of the method assumes a size constraint is present and an optional permitted alphabet constraint.

The value to encode is stored in the public mValue member variable in the Asn1CharString base class.

Parameters:
buffer Encode message buffer object
charSet Object representing permitted alphabet constraint character set (optional)
lower Effective size constraint lower bound
upper Effective size constraint upper bound
virtual void Encode ( Asn1PerEncodeBuffer  buffer,
Asn1CharSet  charSet 
) [virtual]

This method encodes an ASN.1 character string value in accordance with the packed encoding rules (PER). This version of the method assumes no size constraints but does allow a permitted alphabet character set to be specified.

The value to encode is stored in the public mValue member variable in the Asn1CharString base class.

Parameters:
buffer Encode message buffer object
charSet Object representing permitted alphabet constraint character set (optional)
override void Encode ( Asn1PerEncodeBuffer  buffer  )  [virtual]

This method encodes an ASN.1 character string value in accordance with the packed encoding rules (PER). This version of the method assumes no permitted alphabet or size constraints.

The value to encode is stored in the public mValue member variable in the Asn1CharString base class.

Parameters:
buffer Encode message buffer object

Reimplemented from Asn1Type.

Reimplemented in Asn1AbstractTime, Asn1Date, Asn1DateTime, Asn1Duration, Asn1NumericString, and Asn1TimeOfDay.


Member Data Documentation

const int BITSPERCHAR_A = 8

The BITSPERCHAR_A constant specifies the number of bits per character for PER (aligned).

const int BITSPERCHAR_U = 7

The BITSPERCHAR_U constant specifies the number of bits per character for PER (unaligned).