ReadAsync(byte[], int, int)
This method returns a Task-based asynchronous version of OracleBFile.Read()
, which reads a specified number of bytes from the OracleBFile
instance and populates the buffer.
Declaration
// C# public Task<int> ReadAsync(byte[] buffer, int offset, int count)
Parameters
-
buffer
- The byte array buffer to be populated. -
offset
- The starting offset (in bytes) at which the buffer is populated. -
count
- The number of bytes to read.
Return Value
Task<Int>
object representing the asynchronous operation immediately without blocking the calling thread for the whole duration of the query execution.
Implements
Stream
Exceptions
-
ObjectDisposedException
- The object is already disposed. -
InvalidOperationException
- TheOracleConnection
is not open or has been closed during the lifetime of the object. -
ArgumentOutOfRangeException
- This exception is thrown if any of the following conditions exist:-
The
offset
or thecount
parameter is less than0
. -
The
offset
is greater than or equal to thebuffer.Length
. -
The
offset
and thecount
together are greater than thebuffer.Length
.
-