CharsetEncoder.ReplaceWith(Byte[]) Method

Definition

Changes this encoder's replacement value.

[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

Parameters

newReplacement
Byte[]

The new replacement; must not be null, must have non-zero length,

                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>

Returns

This encoder

Attributes

Exceptions

if the given replacement cannot satisfy the requirement mentioned above.

Remarks

Changes this encoder's replacement value.

This method invokes the #implReplaceWith implReplaceWith method, passing the new replacement, after checking that the new replacement is acceptable.

Java documentation for java.nio.charset.CharsetEncoder.replaceWith(byte[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to