O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Decoder

Synopsis

This class converts byte arrays to character arrays using the encoding class from which it was constructed (a decoder is returned by the GetDecoder() method of an Encoding subclass). Decoder saves its state between calls to GetChars(), so leftover bytes from previous input byte arrays are remembered and used in subsequent calls.

public abstract class Decoder {
// Protected Constructors
   protected method Decoder();  
// Public Instance Methods
   public abstract method int GetCharCount(byte[] bytes, 
        int index, int count);  
   public abstract method int GetChars(byte[] bytes, 
        int byteIndex, int byteCount, char[] chars, 
        int charIndex);  
}

Returned By

Encoding.GetDecoder()

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required