Asn1VarWidthCharString Class Reference
Public Member Functions | |
override void | Decode (Asn1OerDecodeBuffer buffer) |
virtual void | Decode (Asn1PerDecodeBuffer buffer, long lower, long upper) |
override void | Decode (Asn1PerDecodeBuffer buffer) |
virtual void | Encode (Asn1PerOutputStream outs, long lower, long upper) |
override void | Encode (Asn1PerOutputStream outs) |
override void | Encode (Asn1OerEncodeBuffer buffer) |
virtual void | Encode (Asn1PerEncodeBuffer buffer, long lower, long upper) |
override void | Encode (Asn1PerEncodeBuffer buffer) |
Public Attributes | |
const int | BITSPERCHAR_A = 8 |
const int | BITSPERCHAR_U = 8 |
Protected Member Functions | |
internal | Asn1VarWidthCharString (System.String data, short typeCode) |
internal | Asn1VarWidthCharString (short typeCode) |
Detailed Description
This is an abstract base class for holding the ASN.1 variable width character string types (GraphicString, GeneralString, TeletexString, T61String, VideotexString, ObjectDescriptor).
Constructor & Destructor Documentation
internal Asn1VarWidthCharString | ( | short | typeCode | ) | [protected] |
The default constructor creates an empty string object.
- Parameters:
-
typeCode Universal ID code for ASN.1 character string
internal Asn1VarWidthCharString | ( | 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
override void Decode | ( | Asn1OerDecodeBuffer | buffer | ) | [virtual] |
Decode the value in accordance with OER.
Subclasses may override this to add constraint checks after invoking this method to decode the string.
Reimplemented from Asn1Type.
virtual void Decode | ( | Asn1PerDecodeBuffer | buffer, | |
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. A permitted alphabet may be passed, but it will be ignored.
The decoded result is stored in the public mValue
member variable in the Asn1CharString
base class.
- Parameters:
-
buffer Decode message buffer object lower Effective size constraint lower bound upper Effective size constraint upper bound
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.
virtual void Encode | ( | Asn1PerOutputStream | outs, | |
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. A permitted alphabet may be passed, but it will be ignored.
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 lower Effective size constraint lower bound upper Effective size constraint upper bound
- 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.
override void Encode | ( | Asn1OerEncodeBuffer | buffer | ) | [virtual] |
Encode the value in accordance with OER.
We're assuming each char is encoded in a single byte of the same value as the char.
Subclasses may override this (e.g. to add constraint checks) and invoke this method to perform the encoding.
Reimplemented from Asn1Type.
virtual void Encode | ( | Asn1PerEncodeBuffer | buffer, | |
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. A permitted alphabet may be passed, but it will be ignored.
The value to encode is stored in the public mValue
member variable in the Asn1CharString
base class.
- Parameters:
-
buffer Encode message buffer object lower Effective size constraint lower bound upper Effective size constraint upper bound
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.
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 = 8 |
The BITSPERCHAR_U
constant specifies the number of bits per character for PER (unaligned).