RandomAccessFile.Write 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
| Write(Byte[]) |
Writes |
| Write(Int32) |
Writes the specified byte to this file. |
| Write(Byte[], Int32, Int32) |
Writes |
Write(Byte[])
Writes b.length bytes from the specified byte array
to this file, starting at the current file pointer.
[Android.Runtime.Register("write", "([B)V", "GetWrite_arrayBHandler")]
public virtual void Write(byte[]? b);
[<Android.Runtime.Register("write", "([B)V", "GetWrite_arrayBHandler")>]
abstract member Write : byte[] -> unit
override this.Write : byte[] -> unit
Parameters
- b
- Byte[]
the data.
Implements
- Attributes
Exceptions
if an I/O error occurs while writing to this file.
Remarks
Writes b.length bytes from the specified byte array to this file, starting at the current file pointer.
Java documentation for java.io.RandomAccessFile.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 the specified byte to this file.
[Android.Runtime.Register("write", "(I)V", "GetWrite_IHandler")]
public virtual void Write(int b);
[<Android.Runtime.Register("write", "(I)V", "GetWrite_IHandler")>]
abstract member Write : int -> unit
override this.Write : int -> unit
Parameters
- b
- Int32
the byte to be written.
Implements
- Attributes
Exceptions
if this file is closed or another I/O error occurs.
Remarks
Writes the specified byte to this file. The write starts at the current file pointer.
Java documentation for java.io.RandomAccessFile.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 the specified byte array
starting at offset off to this file.
[Android.Runtime.Register("write", "([BII)V", "GetWrite_arrayBIIHandler")]
public virtual void Write(byte[]? b, int off, int len);
[<Android.Runtime.Register("write", "([BII)V", "GetWrite_arrayBIIHandler")>]
abstract member Write : byte[] * int * int -> unit
override this.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.
Implements
- Attributes
Exceptions
if byteCount , byteOffset or byteCount +
byteOffset is greater than the size of buffer.
if an I/O error occurs while writing to this file.
Remarks
Writes len bytes from the specified byte array starting at offset off to this file.
Java documentation for java.io.RandomAccessFile.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.