Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Read() |
Reads a byte of data from this file. |
Read(Byte[]) |
Reads up to |
Read(Byte[], Int32, Int32) |
Reads up to |
Reads a byte of data from this file.
[Android.Runtime.Register("read", "()I", "GetReadHandler")]
public virtual int Read();
[<Android.Runtime.Register("read", "()I", "GetReadHandler")>]
abstract member Read : unit -> int
override this.Read : unit -> int
the next byte of data, or -1
if the end of the
file has been reached.
if this file is closed or another I/O error occurs.
Reads a byte of data from this file. The byte is returned as an integer in the range 0 to 255 (0x00-0x0ff
). This method blocks if no input is yet available.
Although RandomAccessFile
is not a subclass of InputStream
, this method behaves in exactly the same way as the InputStream#read()
method of InputStream
.
Java documentation for java.io.RandomAccessFile.read()
.
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.
Reads up to b.length
bytes of data from this file
into an array of bytes.
[Android.Runtime.Register("read", "([B)I", "GetRead_arrayBHandler")]
public virtual int Read(byte[]? b);
[<Android.Runtime.Register("read", "([B)I", "GetRead_arrayBHandler")>]
abstract member Read : byte[] -> int
override this.Read : byte[] -> int
the buffer into which the data is read.
the total number of bytes read into the buffer, or
-1
if there is no more data because the end of
this file has been reached.
if this file is closed or another I/O error occurs.
Reads up to b.length
bytes of data from this file into an array of bytes. This method blocks until at least one byte of input is available.
Although RandomAccessFile
is not a subclass of InputStream
, this method behaves in exactly the same way as the InputStream#read(byte[])
method of InputStream
.
Java documentation for java.io.RandomAccessFile.read(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.
Reads up to len
bytes of data from this file into an
array of bytes.
[Android.Runtime.Register("read", "([BII)I", "GetRead_arrayBIIHandler")]
public virtual int Read(byte[]? b, int off, int len);
[<Android.Runtime.Register("read", "([BII)I", "GetRead_arrayBIIHandler")>]
abstract member Read : byte[] * int * int -> int
override this.Read : byte[] * int * int -> int
the buffer into which the data is read.
the start offset in array b
at which the data is written.
the maximum number of bytes read.
the total number of bytes read into the buffer, or
-1
if there is no more data because the end of
the file has been reached.
if byteOffset buffer.length
.
if this file is closed or another I/O error occurs.
Reads up to len
bytes of data from this file into an array of bytes. This method blocks until at least one byte of input is available.
Although RandomAccessFile
is not a subclass of InputStream
, this method behaves in exactly the same way as the InputStream#read(byte[], int, int)
method of InputStream
.
Java documentation for java.io.RandomAccessFile.read(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.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in