Decoder

Decoder


Provides an interface to be used in converting blocks of bytes into unicode characters.


Public:

Properties:

NameDescription
 Fallback (get) Returns a DecoderFallback object for the current Decoder object.  
 Fallback (set) Sets a DecoderFallback object for the current Decoder object.  
 FallbackBuffer (get) Returns a DecoderFallbackBuffer object associated with the current Decoder object.  

Methods:

NameDescription
 Convert Converts an array of encoded bytes to UTF-16 encoded characters and stores the result in a character array.  
 Equals Returns an indication of equality with the passed in value.  
 GetCharCount Returns the number of characters a block of bytes can produce.  
 GetChars Returns the decoded unicode characters from a block of bytes.  
 GetHashCode Returns a pseudo-unique number that describes this instance.  
 Reset Sets Decoder to initial value.  
 ToString Returns a string representation of this instance.  

Remarks

Using a Decoder is different than using a normal Encoding because a Decoder can maintain state between calls. This allows a Decoder to decode characters that span method calls where as an Encoding method calls have no knowledge of previous data. A Decoder is useful in situation where unknown streams of data may need to be processed in multiple chunks such as over a network.

See Also

Project CorLib Overview

Class Decoder Overview