語言

CharsetEncoder.ReplaceWith(Byte[]) 方法

定義

改變此編碼器的替換值。

[Android.Runtime.Register("replaceWith", "([B)Ljava/nio/charset/CharsetEncoder;", "")]
public Java.Nio.Charset.CharsetEncoder? ReplaceWith(byte[]? newReplacement);
[<Android.Runtime.Register("replaceWith", "([B)Ljava/nio/charset/CharsetEncoder;", "")>]
member this.ReplaceWith : byte[] -> Java.Nio.Charset.CharsetEncoder

參數

newReplacement
Byte[]

新的接替者;必須不為 null,且長度必須非零,

                must not be longer than the value returned by the
                <code data-dev-comment-type="c">#maxBytesPerChar() maxBytesPerChar</code> method, and
                must be <code data-dev-comment-type="c">#isLegalReplacement legal</code>

傳回

此編碼器

屬性

例外狀況

若所給替換無法滿足上述要求。

備註

改變此編碼器的替換值。

此方法在確認新替換可接受後,會呼叫該 #implReplaceWith implReplaceWith 方法,傳遞新的替換。

Java 文件 java.nio.charset.CharsetEncoder.replaceWith(byte[])。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於