Channels.NewWriter Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The channel to which bytes will be written
- csName
- String
The name of the charset to be used
Returns
A new writer
- Attributes
Exceptions
if the given charset name is not supported.
Remarks
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
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
A new writer
- Attributes
Remarks
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.