mscorlib(4.0.0.0) API with additions
|
Converts a sequence of encoded bytes into a set of characters. More...
Inherited by System.Text.DecoderNLS, System.Xml.SafeAsciiDecoder, System.Xml.Ucs4Decoder, and System.Xml.UTF16Decoder.
Public Member Functions | |
virtual void | Reset () |
When overridden in a derived class, sets the decoder back to its initial state. More... | |
abstract int | GetCharCount (byte[] bytes, int index, int count) |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. More... | |
virtual int | GetCharCount (byte[] bytes, int index, int count, bool flush) |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. A parameter indicates whether to clear the internal state of the decoder after the calculation. More... | |
virtual unsafe int | GetCharCount (byte *bytes, int count, bool flush) |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer. A parameter indicates whether to clear the internal state of the decoder after the calculation. More... | |
abstract int | GetChars (byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex) |
When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array. More... | |
virtual int | GetChars (byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, bool flush) |
When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array. A parameter indicates whether to clear the internal state of the decoder after the conversion. More... | |
virtual unsafe int | GetChars (byte *bytes, int byteCount, char *chars, int charCount, bool flush) |
When overridden in a derived class, decodes a sequence of bytes starting at the specified byte pointer and any bytes in the internal buffer into a set of characters that are stored starting at the specified character pointer. A parameter indicates whether to clear the internal state of the decoder after the conversion. More... | |
virtual void | Convert (byte[] bytes, int byteIndex, int byteCount, char[] chars, int charIndex, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) |
Converts an array of encoded bytes to UTF-16 encoded characters and stores the result in a character array. More... | |
virtual unsafe void | Convert (byte *bytes, int byteCount, char *chars, int charCount, bool flush, out int bytesUsed, out int charsUsed, out bool completed) |
Converts a buffer of encoded bytes to UTF-16 encoded characters and stores the result in another buffer. More... | |
Protected Member Functions | |
Decoder () | |
Initializes a new instance of the T:System.Text.Decoder class. More... | |
Properties | |
DecoderFallback | Fallback [get, set] |
Gets or sets a T:System.Text.DecoderFallback object for the current T:System.Text.Decoder object. More... | |
DecoderFallbackBuffer | FallbackBuffer [get] |
Gets the T:System.Text.DecoderFallbackBuffer object associated with the current T:System.Text.Decoder object. More... | |
Converts a sequence of encoded bytes into a set of characters.
Definition at line 11 of file Decoder.cs.
|
protected |
Initializes a new instance of the T:System.Text.Decoder class.
Definition at line 80 of file Decoder.cs.
|
virtual |
Converts an array of encoded bytes to UTF-16 encoded characters and stores the result in a character array.
bytes | A byte array to convert. |
byteIndex | The first element of bytes to convert. |
byteCount | The number of elements of bytes to convert. |
chars | An array to store the converted characters. |
charIndex | The first element of chars in which data is stored. |
charCount | The maximum number of elements of chars to use in the conversion. |
flush | true to indicate that no further data is to be converted; otherwise, false . |
bytesUsed | When this method returns, contains the number of bytes that were used in the conversion. This parameter is passed uninitialized. |
charsUsed | When this method returns, contains the number of characters from chars that were produced by the conversion. This parameter is passed uninitialized. |
completed | When this method returns, contains true if all the characters specified by byteCount were converted; otherwise, false . This parameter is passed uninitialized. |
T:System.ArgumentNullException | chars or bytes is null (Nothing ). |
T:System.ArgumentOutOfRangeException | charIndex , charCount , byteIndex , or byteCount is less than zero.-or-The length of chars - charIndex is less than charCount .-or-The length of bytes - byteIndex is less than byteCount . |
T:System.ArgumentException | The output buffer is too small to contain any of the converted input. The output buffer should be greater than or equal to the size indicated by the Overload:System.Text.Decoder.GetCharCount method. |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
Definition at line 283 of file Decoder.cs.
|
virtual |
Converts a buffer of encoded bytes to UTF-16 encoded characters and stores the result in another buffer.
bytes | The address of a buffer that contains the byte sequences to convert. |
byteCount | The number of bytes in bytes to convert. |
chars | The address of a buffer to store the converted characters. |
charCount | The maximum number of characters in chars to use in the conversion. |
flush | true to indicate no further data is to be converted; otherwise, false . |
bytesUsed | When this method returns, contains the number of bytes that were produced by the conversion. This parameter is passed uninitialized. |
charsUsed | When this method returns, contains the number of characters from chars that were used in the conversion. This parameter is passed uninitialized. |
completed | When this method returns, contains true if all the characters specified by byteCount were converted; otherwise, false . This parameter is passed uninitialized. |
T:System.ArgumentNullException | chars or bytes is null (Nothing ). |
T:System.ArgumentOutOfRangeException | charCount or byteCount is less than zero. |
T:System.ArgumentException | The output buffer is too small to contain any of the converted input. The output buffer should be greater than or equal to the size indicated by the Overload:System.Text.Decoder.GetCharCount method. |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
Definition at line 338 of file Decoder.cs.
|
pure virtual |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array.
bytes | The byte array containing the sequence of bytes to decode. |
index | The index of the first byte to decode. |
count | The number of bytes to decode. |
T:System.ArgumentNullException | bytes is null (Nothing ). |
T:System.ArgumentOutOfRangeException | index or count is less than zero.-or- index and count do not denote a valid range in bytes . |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
|
virtual |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes from the specified byte array. A parameter indicates whether to clear the internal state of the decoder after the calculation.
bytes | The byte array containing the sequence of bytes to decode. |
index | The index of the first byte to decode. |
count | The number of bytes to decode. |
flush | true to simulate clearing the internal state of the encoder after the calculation; otherwise, false . |
T:System.ArgumentNullException | bytes is null (Nothing ). |
T:System.ArgumentOutOfRangeException | index or count is less than zero.-or- index and count do not denote a valid range in bytes . |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
Definition at line 129 of file Decoder.cs.
|
virtual |
When overridden in a derived class, calculates the number of characters produced by decoding a sequence of bytes starting at the specified byte pointer. A parameter indicates whether to clear the internal state of the decoder after the calculation.
bytes | A pointer to the first byte to decode. |
count | The number of bytes to decode. |
flush | true to simulate clearing the internal state of the encoder after the calculation; otherwise, false . |
T:System.ArgumentNullException | bytes is null (Nothing in Visual Basic .NET). |
T:System.ArgumentOutOfRangeException | count is less than zero. |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
Definition at line 149 of file Decoder.cs.
|
pure virtual |
When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array.
bytes | The byte array containing the sequence of bytes to decode. |
byteIndex | The index of the first byte to decode. |
byteCount | The number of bytes to decode. |
chars | The character array to contain the resulting set of characters. |
charIndex | The index at which to start writing the resulting set of characters. |
T:System.ArgumentNullException | bytes is null (Nothing ).-or- chars is null (Nothing ). |
T:System.ArgumentOutOfRangeException | byteIndex or byteCount or charIndex is less than zero.-or- byteindex and byteCount do not denote a valid range in bytes .-or- charIndex is not a valid index in chars . |
T:System.ArgumentException | chars does not have enough capacity from charIndex to the end of the array to accommodate the resulting characters. |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
|
virtual |
When overridden in a derived class, decodes a sequence of bytes from the specified byte array and any bytes in the internal buffer into the specified character array. A parameter indicates whether to clear the internal state of the decoder after the conversion.
bytes | The byte array containing the sequence of bytes to decode. |
byteIndex | The index of the first byte to decode. |
byteCount | The number of bytes to decode. |
chars | The character array to contain the resulting set of characters. |
charIndex | The index at which to start writing the resulting set of characters. |
flush | true to clear the internal state of the decoder after the conversion; otherwise, false . |
T:System.ArgumentNullException | bytes is null (Nothing ).-or- chars is null (Nothing ). |
T:System.ArgumentOutOfRangeException | byteIndex or byteCount or charIndex is less than zero.-or- byteindex and byteCount do not denote a valid range in bytes .-or- charIndex is not a valid index in chars . |
T:System.ArgumentException | chars does not have enough capacity from charIndex to the end of the array to accommodate the resulting characters. |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
Definition at line 209 of file Decoder.cs.
|
virtual |
When overridden in a derived class, decodes a sequence of bytes starting at the specified byte pointer and any bytes in the internal buffer into a set of characters that are stored starting at the specified character pointer. A parameter indicates whether to clear the internal state of the decoder after the conversion.
bytes | A pointer to the first byte to decode. |
byteCount | The number of bytes to decode. |
chars | A pointer to the location at which to start writing the resulting set of characters. |
charCount | The maximum number of characters to write. |
flush | true to clear the internal state of the decoder after the conversion; otherwise, false . |
T:System.ArgumentNullException | bytes is null (Nothing ).-or- chars is null (Nothing ). |
T:System.ArgumentOutOfRangeException | byteCount or charCount is less than zero. |
T:System.ArgumentException | charCount is less than the resulting number of characters. |
T:System.Text.DecoderFallbackException | A fallback occurred (see Character Encoding in the .NET Framework for fuller explanation)-and- P:System.Text.Decoder.Fallback is set to T:System.Text.DecoderExceptionFallback. |
Definition at line 234 of file Decoder.cs.
|
virtual |
When overridden in a derived class, sets the decoder back to its initial state.
Definition at line 87 of file Decoder.cs.
|
getset |
Gets or sets a T:System.Text.DecoderFallback object for the current T:System.Text.Decoder object.
T:System.ArgumentNullException | The value in a set operation is null (Nothing ). |
T:System.ArgumentException | A new value cannot be assigned in a set operation because the current T:System.Text.DecoderFallbackBuffer object contains data that has not been decoded yet. |
Definition at line 25 of file Decoder.cs.
|
get |
Gets the T:System.Text.DecoderFallbackBuffer object associated with the current T:System.Text.Decoder object.
Definition at line 52 of file Decoder.cs.