Share via


IDataOutput.WriteChar(Int32) Method

Definition

Writes a char value, which is comprised of two bytes, to the output stream.

[Android.Runtime.Register("writeChar", "(I)V", "GetWriteChar_IHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void WriteChar (int v);
[<Android.Runtime.Register("writeChar", "(I)V", "GetWriteChar_IHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member WriteChar : int -> unit

Parameters

v
Int32

the char value to be written.

Attributes

Exceptions

if an I/O error occurs while writing.

Remarks

Writes a char value, which is comprised of two bytes, to the output stream. The byte values to be written, in the order shown, are:

{@code
            (byte)(0xff & (v >> 8))
            (byte)(0xff & v)
            }

The bytes written by this method may be read by the readChar method of interface DataInput , which will then return a char equal to (char)v.

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

See also