DecoderReplacementFallbackBuffer 類別

定義

表示在無法解碼原始輸入位元組序列時,所發出的替代輸出字串。Represents a substitute output string that is emitted when the original input byte sequence cannot be decoded. 此類別無法獲得繼承。This class cannot be inherited.

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

備註

如果沒有適當的解碼存在,可能無法將編碼的位元組序列轉換為相等的字元。It might not be possible to convert an encoded byte sequence to an equivalent character if no suitable decoding exists. 解碼失敗的常見原因是轉換作業所使用的字碼頁無法代表要解碼的字元。A common reason for a decoding to fail is that the conversion operation uses a code page that cannot represent the character to decode.

如果輸入位元組序列無法轉換成輸出字元, System.Text.DecoderReplacementFallback 物件就會提供替代的字串來取代輸出字元。If the input byte sequence cannot be converted to an output character, a System.Text.DecoderReplacementFallback object provides a replacement string that is substituted for the output character. 取代字串會初始化物件的值 DecoderReplacementFallback ,而物件的值會 DecoderReplacementFallback 初始化物件的值 DecoderReplacementFallbackBufferThe replacement string initializes the value of the DecoderReplacementFallback object, and the value of the DecoderReplacementFallback object initializes the value of a DecoderReplacementFallbackBuffer object. 物件的值 DecoderReplacementFallbackBuffer 稱為取代回溯緩衝區。The value of a DecoderReplacementFallbackBuffer object is called the replacement fallback buffer. 轉換作業會使用取代回緩衝區來發出取代字串,而不是解碼的字元,然後繼續處理輸入的其餘部分。The conversion operation uses the replacement fallback buffer to emit a replacement string instead of a decoded character, then continues to process the remainder of the input.

建構函式

DecoderReplacementFallbackBuffer(DecoderReplacementFallback)

使用 DecoderReplacementFallbackBuffer 物件的值,初始化 DecoderReplacementFallback 類別的新執行個體。Initializes a new instance of the DecoderReplacementFallbackBuffer class using the value of a DecoderReplacementFallback object.

屬性

Remaining

取得在取代後援緩衝區中仍然要處理的字元數。Gets the number of characters in the replacement fallback buffer that remain to be processed.

方法

Equals(Object)

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

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

預備取代後援緩衝區來使用目前的取代字串。Prepares the replacement fallback buffer to use the current replacement string.

GetHashCode()

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

(繼承來源 Object)
GetNextChar()

擷取取代後援緩衝區中的下一個字元。Retrieves the next character in the replacement fallback 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 character position in the replacement fallback buffer prior to the current character position.

Reset()

初始化 DecoderReplacementFallbackBuffer 物件中的所有內部狀態資訊和資料。Initializes all internal state information and data in the DecoderReplacementFallbackBuffer object.

ToString()

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

(繼承來源 Object)

適用於