Language

Charset.ForName Method

Definition

Overloads

Name Description
ForName(String)

Returns a charset object for the named charset.

ForName(String, Charset)

Returns a charset object for the named charset.

ForName(String)

Returns a charset object for the named charset.

[Android.Runtime.Register("forName", "(Ljava/lang/String;)Ljava/nio/charset/Charset;", "")]
public static Java.Nio.Charset.Charset? ForName(string? charsetName);
[<Android.Runtime.Register("forName", "(Ljava/lang/String;)Ljava/nio/charset/Charset;", "")>]
static member ForName : string -> Java.Nio.Charset.Charset

Parameters

charsetName
String

The name of the requested charset; may be either a canonical name or an alias

Returns

A charset object for the named charset

Attributes

Exceptions

if the specified charset name is illegal.

if the desired charset is not supported by this runtime.

Remarks

Returns a charset object for the named charset.

Java documentation for java.nio.charset.Charset.forName(java.lang.String).

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

ForName(String, Charset)

Returns a charset object for the named charset.

[Android.Runtime.Register("forName", "(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;", "", ApiSince=37)]
public static Java.Nio.Charset.Charset? ForName(string? charsetName, Java.Nio.Charset.Charset? fallback);
[<Android.Runtime.Register("forName", "(Ljava/lang/String;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;", "", ApiSince=37)>]
static member ForName : string * Java.Nio.Charset.Charset -> Java.Nio.Charset.Charset

Parameters

charsetName
String

The name of the requested charset; may be either a canonical name or an alias

fallback
Charset

fallback charset in case the charset object for the named charset is not available or charsetName is not a legal charset name. May be null

Returns

A charset object for the named charset, or fallback in case the charset object for the named charset is not available or charsetName is not a legal charset name

Attributes

Applies to