Channels.NewWriter Method

Definition

Overloads

NewWriter(IWritableByteChannel, String)

Constructs a writer that encodes characters according to the named charset and writes the resulting bytes to the given channel.

NewWriter(IWritableByteChannel, CharsetEncoder, Int32)

Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel.

NewWriter(IWritableByteChannel, String)

Constructs a writer that encodes characters according to the named charset and writes the resulting bytes to the given channel.

[Android.Runtime.Register("newWriter", "(Ljava/nio/channels/WritableByteChannel;Ljava/lang/String;)Ljava/io/Writer;", "")]
public static Java.IO.Writer? NewWriter (Java.Nio.Channels.IWritableByteChannel? ch, string? csName);
[<Android.Runtime.Register("newWriter", "(Ljava/nio/channels/WritableByteChannel;Ljava/lang/String;)Ljava/io/Writer;", "")>]
static member NewWriter : Java.Nio.Channels.IWritableByteChannel * string -> Java.IO.Writer

Parameters

ch
IWritableByteChannel

The channel to which bytes will be written

csName
String

The name of the charset to be used

Returns

Writer

A new writer

Attributes

Exceptions

if the given charset name is not supported.

Remarks

Java documentation for java.nio.channels.Channels.newWriter(java.nio.channels.WritableByteChannel, 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

NewWriter(IWritableByteChannel, CharsetEncoder, Int32)

Constructs a writer that encodes characters using the given encoder and writes the resulting bytes to the given channel.

[Android.Runtime.Register("newWriter", "(Ljava/nio/channels/WritableByteChannel;Ljava/nio/charset/CharsetEncoder;I)Ljava/io/Writer;", "")]
public static Java.IO.Writer? NewWriter (Java.Nio.Channels.IWritableByteChannel? ch, Java.Nio.Charset.CharsetEncoder? enc, int minBufferCap);
[<Android.Runtime.Register("newWriter", "(Ljava/nio/channels/WritableByteChannel;Ljava/nio/charset/CharsetEncoder;I)Ljava/io/Writer;", "")>]
static member NewWriter : Java.Nio.Channels.IWritableByteChannel * Java.Nio.Charset.CharsetEncoder * int -> Java.IO.Writer

Parameters

ch
IWritableByteChannel

The channel to which bytes will be written

enc
CharsetEncoder

The charset encoder to be used

minBufferCap
Int32

The minimum capacity of the internal byte buffer, or -1 if an implementation-dependent default capacity is to be used

Returns

Writer

A new writer

Attributes

Remarks

Java documentation for java.nio.channels.Channels.newWriter(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int).

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