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.nio.charset.CharsetEncoder.replaceWith(byte[])Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于