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- TheOracleConnectionis 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
offsetor thecountparameter is less than0. -
The
offsetis greater than or equal to thebuffer.Length. -
The
offsetand thecounttogether are greater than thebuffer.Length.
-