IDataOutput.Write Method

Definition

Overloads

Write(Byte[])

Writes to the output stream all the bytes in array b.

Write(Int32)

Writes to the output stream the eight low-order bits of the argument b.

Write(Byte[], Int32, Int32)

Writes len bytes from array b, in order, to the output stream.

Write(Byte[])

Writes to the output stream all the bytes in array b.

[Android.Runtime.Register("write", "([B)V", "GetWrite_arrayBHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Write (byte[]? b);
[<Android.Runtime.Register("write", "([B)V", "GetWrite_arrayBHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Write : byte[] -> unit

Parameters

b
Byte[]

the data.

Attributes

Exceptions

if an I/O error occurs while writing.

Remarks

Writes to the output stream all the bytes in array b. If b is null, a NullPointerException is thrown. If b.length is zero, then no bytes are written. Otherwise, the byte b[0] is written first, then b[1], and so on; the last byte written is b[b.length-1].

Java documentation for java.io.DataOutput.write(byte[]).

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

Write(Int32)

Writes to the output stream the eight low-order bits of the argument b.

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

Parameters

b
Int32

the byte to be written.

Attributes

Exceptions

if an I/O error occurs while writing.

Remarks

Writes to the output stream the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

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

See also

Applies to

Write(Byte[], Int32, Int32)

Writes len bytes from array b, in order, to the output stream.

[Android.Runtime.Register("write", "([BII)V", "GetWrite_arrayBIIHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Write (byte[]? b, int off, int len);
[<Android.Runtime.Register("write", "([BII)V", "GetWrite_arrayBIIHandler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Write : byte[] * int * int -> unit

Parameters

b
Byte[]

the data.

off
Int32

the start offset in the data.

len
Int32

the number of bytes to write.

Attributes

Exceptions

if an I/O error occurs while writing.

Remarks

Writes len bytes from array b, in order, to the output stream. If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown. If len is zero, then no bytes are written. Otherwise, the byte b[off] is written first, then b[off+1], and so on; the last byte written is b[off+len-1].

Java documentation for java.io.DataOutput.write(byte[], int, 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