Java.Lang.String.GetBytes Method
Returns a new byte array containing the code points of this string encoded using the given charset.

Syntax

[Android.Runtime.Register("getBytes", "(Ljava/nio/charset/Charset;)[B", "")]
public byte[] GetBytes (Java.Nio.Charset.Charset p0)

Parameters

charset
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Returns a new byte array containing the code points of this string encoded using the given charset.

The behavior when this string cannot be represented in the given charset is to replace malformed input and unmappable code points with the charset's default replacement byte array. Use Java.Nio.Charset.CharsetEncoder for more control.

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 9