Share via


IDataOutput.WriteChars(String) Method

Definition

Writes every character in the string s, to the output stream, in order, two bytes per character.

[Android.Runtime.Register("writeChars", "(Ljava/lang/String;)V", "GetWriteChars_Ljava_lang_String_Handler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void WriteChars (string? s);
[<Android.Runtime.Register("writeChars", "(Ljava/lang/String;)V", "GetWriteChars_Ljava_lang_String_Handler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member WriteChars : string -> unit

Parameters

s
String

the string value to be written.

Attributes

Exceptions

if an I/O error occurs while writing.

Remarks

Writes every character in the string s, to the output stream, in order, two bytes per character. If s is null, a NullPointerException is thrown. If s.length is zero, then no characters are written. Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]. For each character, two bytes are actually written, high-order byte first, in exactly the manner of the writeChar method.

Java documentation for java.io.DataOutput.writeChars(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

See also