DecoderExceptionFallbackBuffer 類別

定義

當編碼的輸入位元組序列無法轉換成已解碼的輸出字元時,會擲回 DecoderFallbackExceptionThrows DecoderFallbackException when an encoded input byte sequence cannot be converted to a decoded output character. 此類別無法獲得繼承。This class cannot be inherited.

public ref class DecoderExceptionFallbackBuffer sealed : System::Text::DecoderFallbackBuffer
public sealed class DecoderExceptionFallbackBuffer : System.Text.DecoderFallbackBuffer
type DecoderExceptionFallbackBuffer = class
    inherit DecoderFallbackBuffer
Public NotInheritable Class DecoderExceptionFallbackBuffer
Inherits DecoderFallbackBuffer
繼承
DecoderExceptionFallbackBuffer

備註

編碼或解碼作業失敗的常見原因是基礎編碼類別未提供字元與相等位元組序列之間的對應。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. 如果輸入位元組序列無法轉換成輸出字元,則解碼作業會呼叫 Fallback 方法,而這個方法會擲回 DecoderFallbackExceptionIf the input byte sequence cannot be converted to an output character, the decoding operation calls the Fallback method, which throws DecoderFallbackException.

System.Text.DecoderFallbackBuffer類別(代表解碼作業中使用的資料緩衝區)是類別的基類(base class) DecoderExceptionFallbackBufferThe System.Text.DecoderFallbackBuffer class, which represents a data buffer used in a decoding operation, is the base class for the DecoderExceptionFallbackBuffer class. 但是, DecoderExceptionFallbackBuffer 類別代表標準行為,如果解碼作業失敗,則會擲回例外狀況。However, instead of a data buffer, the DecoderExceptionFallbackBuffer class represents a standard behavior in which an exception is thrown if a decoding operation fails. 沒有實際的資料緩衝區存在,而且設計來操作這類緩衝區的成員沒有任何重大的工作。No actual data buffer exists, and the members designed to manipulate such a buffer do no significant work.

建構函式

DecoderExceptionFallbackBuffer()

初始化 DecoderExceptionFallbackBuffer 類別的新執行個體。Initializes a new instance of the DecoderExceptionFallbackBuffer class.

屬性

Remaining

取得在目前的 DecoderExceptionFallbackBuffer 物件中仍要處理的字元數。Gets the number of characters in the current DecoderExceptionFallbackBuffer object that remain to be processed.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Fallback(Byte[], Int32)

在無法解碼輸入位元組序列時,會擲回 DecoderFallbackExceptionThrows DecoderFallbackException when the input byte sequence cannot be decoded. 不會使用名義上的傳回值。The nominal return value is not used.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetNextChar()

擷取例外狀況資料緩衝區中的下一個字元。Retrieves the next character in the exception data buffer.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
MovePrevious()

使得 GetNextChar() 的下一個呼叫存取在目前位置之前的例外狀況資料緩衝區字元位置。Causes the next call to GetNextChar() to access the exception data buffer character position that is prior to the current position.

Reset()

初始化與後援緩衝區有關的所有資料和狀態資訊。Initializes all data and state information pertaining to this fallback buffer.

(繼承來源 DecoderFallbackBuffer)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於