ASN1C C# Runtime Library  7.5
Public Member Functions | Properties | List of all members
Asn1XmlXerEncoder Interface Reference
Inheritance diagram for Asn1XmlXerEncoder:
Asn1XerEncoder Asn1XmlEncoder Asn1XerEncodeBuffer Asn1XerOutputStream Asn1XmlEncodeBuffer Asn1XmlOutputStream

Public Member Functions

void Copy (byte data)
 
void Copy (byte[] data)
 
void Copy (byte[] data, int off, int len)
 
void Copy (System.String data)
 
void DecrLevel ()
 
void EncodeBinStrValue (byte[] bits, int nbits)
 
void EncodeByte (byte data)
 
void EncodeData (System.String data)
 
void EncodeEndDocument ()
 
void EncodeHexStrValue (byte[] data)
 
void EncodeNamedValueElement (System.String elemName)
 
void EncodeStartDocument ()
 
void IncrLevel ()
 
void Indent ()
 
bool IsCanonical ()
 

Properties

Asn1Context Context [get]
 

Detailed Description

This is a base interface for encoding of ASN.1 messages as XML as specified in the W3C standard. It is implemented by both the Asn1XmlEncodeBuffer and Asn1XmlOutputStream.

Member Function Documentation

◆ Copy() [1/4]

void Copy ( byte  data)

◆ Copy() [2/4]

void Copy ( byte []  data)

This method copies multiple bytes to the encode buffer or stream. It is assumed the byte are already formatted into a valid XML encoding type (for example, UTF-8).

Throws C# Exception, If I/O error occurs.

Parameters
dataArray of bytes to copy to the encode buffer
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, and Asn1XerOutputStream.

◆ Copy() [3/4]

void Copy ( byte []  data,
int  off,
int  len 
)

This method copies multiple bytes to the encode buffer or stream. It is assumed the byte are already formatted into a valid XML encoding type (for example, UTF-8).

Throws C# Exception, If I/O error occurs.

Parameters
dataArray of bytes to copy to the encode buffer
offThe offset in array at which to begin copy.
lenThe number of bytes to copy
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, and Asn1XerOutputStream.

◆ Copy() [4/4]

void Copy ( System.String  data)

This method copies a character string to the encode buffer or stream.

Throws C# Exception, If I/O error occurs.

Parameters
dataThe string value to copy
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, Asn1XerOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.

◆ DecrLevel()

void DecrLevel ( )

This method decrements the element nesting level counter.

Implemented in Asn1XmlOutputStream, Asn1XerOutputStream, Asn1XmlEncodeBuffer, and Asn1XerEncodeBuffer.

◆ EncodeBinStrValue()

void EncodeBinStrValue ( byte []  bits,
int  nbits 
)

This method encodes XML binary string data

Throws C# Exception, If I/O error occurs.

Parameters
bitsBit String to encode
nbitsNumber of bits to encode
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.

Referenced by Asn1BitString.DecodeXER(), Asn1BitString.Encode(), and Asn1BitString.GetOerEffectiveMin().

◆ EncodeByte()

void EncodeByte ( byte  data)

This method is used to encode a single byte to the encode buffer or stream. It first converts the byte to a hex character representation and then copies it to the output buffer.

Parameters
dataThe byte value to copy

Implemented in Asn1XerOutputStream, Asn1XmlOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.

◆ EncodeData()

void EncodeData ( System.String  data)

This method encodes XML string data

Throws C# Exception, If I/O error occurs.

Parameters
dataString value to encode
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.

Referenced by Asn1CharString.DecodeXER(), Asn1AbstractTime.EncodeXER(), and Asn1CharString.validate().

◆ EncodeEndDocument()

void EncodeEndDocument ( )

This method encodes standard trailor information at the end of the XML document.

Throws C# Exception, If I/O error occurs.

Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, Asn1XerOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.

◆ EncodeHexStrValue()

void EncodeHexStrValue ( byte []  data)

This method encodes XML hexadecimal string data

Throws C# Exception, If I/O error occurs.

Parameters
dataData to encode
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.

Referenced by Asn1OpenType.Encode(), and Asn1OctetString.Encode().

◆ EncodeNamedValueElement()

void EncodeNamedValueElement ( System.String  elemName)

This method encodes an XML named value element tag.

Throws C# Exception, If I/O error occurs.

Parameters
elemNameThe name of element.
Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.

Referenced by Asn1BitString.DecodeXER(), Asn1BitString.Encode(), and Asn1XerUtil.EncodeReal().

◆ EncodeStartDocument()

void EncodeStartDocument ( )

This method encodes standard header information at the beginning of the XML document.

Throws C# Exception, If I/O error occurs.

Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XerOutputStream, Asn1XmlOutputStream, Asn1XerEncodeBuffer, and Asn1XmlEncodeBuffer.

◆ IncrLevel()

void IncrLevel ( )

This method increments the element nesting level counter.

Implemented in Asn1XerOutputStream, Asn1XerEncodeBuffer, Asn1XmlOutputStream, and Asn1XmlEncodeBuffer.

◆ Indent()

void Indent ( )

This methods indents by adding a new-line followed by whitespace corresponding to the current nesting level to the encode buffer.

Throws C# Exception, If I/O error occurs.

Exceptions
Asn1ExceptionThrown, if operation is failed.

Implemented in Asn1XerOutputStream, Asn1XerEncodeBuffer, Asn1XmlOutputStream, and Asn1XmlEncodeBuffer.

Referenced by Asn1XmlAnyElem.Asn1XmlAnyElem(), Asn1BitString.DecodeXER(), Asn1Null.Encode(), Asn1OpenType.Encode(), Asn1OctetString.Encode(), Asn1BitString.Encode(), Asn1OpenType.EncodeAsExtension(), and Asn1BitString.GetOerEffectiveMin().

◆ IsCanonical()

bool IsCanonical ( )

For XER, canonical mode turns off extra whitespace output.

Return true if the encoder has been put into canonical mode. For XML and XER, canonical mode signals the generated encoders to always encode ASN.1 elements that have a DEFAULT value.

Implemented in Asn1XmlOutputStream, Asn1XmlEncodeBuffer, Asn1XerOutputStream, and Asn1XerEncodeBuffer.

Property Documentation

◆ Context

Asn1Context Context
get

The Asn1Context associated with this encoder