IDataOutput.WriteShort(Int32) Method

Definition

Writes two bytes to the output stream to represent the value of the argument.

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

Parameters

v
Int32

the short value to be written.

Attributes

Exceptions

if an I/O error occurs while writing.

Remarks

Writes two bytes to the output stream to represent the value of the argument. 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 readShort method of interface DataInput , which will then return a short equal to (short)v.

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