EncoderExceptionFallbackBuffer
Class
Definition
Throws EncoderFallbackException when an input character cannot be converted to an encoded output byte sequence. This class cannot be inherited.
public sealed class EncoderExceptionFallbackBuffer : System.Text.EncoderFallbackBuffer
- Inheritance
Inherited Members
System.Object
System.Text.EncoderFallbackBuffer
Remarks
A common reason for an encoding or decoding operation to fail is if the underlying encoding class does not provide a mapping between a character and an equivalent byte sequence. If the input character cannot be converted to an output byte sequence, the encoding operation calls the Fallback method, which throws EncoderFallbackException.
The EncoderFallbackBuffer class, which represents a data buffer used in an encoding operation, is the base class for the EncoderExceptionFallbackBuffer class. However, instead of a data buffer, the EncoderExceptionFallbackBuffer class represents a standard behavior wherein an exception is thrown if an encoding operation fails. No actual data buffer exists, and the members designed to manipulate such a buffer do no significant work.
Constructors
| EncoderExceptionFallbackBuffer() |
Initializes a new instance of the EncoderExceptionFallbackBuffer class. |
Properties
| Remaining |
Gets the number of characters in the current EncoderExceptionFallbackBuffer object that remain to be processed. |
Methods
| Fallback(Char, Int32) |
Throws an exception because the input character cannot be encoded. Parameters specify the value and index position of the character that cannot be converted. |
| Fallback(Char, Char, Int32) |
Throws an exception because the input character cannot be encoded. Parameters specify the value and index position of the surrogate pair in the input, and the nominal return value is not used. |
| GetNextChar() |
Retrieves the next character in the exception fallback buffer. |
| MovePrevious() |
Causes the next call to the GetNextChar() method to access the exception data buffer character position that is prior to the current position. |