ProxyFileDescriptorCallback.OnRead(Int64, Int32, Byte[]) 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.
Provides bytes read from file descriptor.
[Android.Runtime.Register("onRead", "(JI[B)I", "GetOnRead_JIarrayBHandler", ApiSince=26)]
public virtual int OnRead (long offset, int size, byte[]? data);
[<Android.Runtime.Register("onRead", "(JI[B)I", "GetOnRead_JIarrayBHandler", ApiSince=26)>]
abstract member OnRead : int64 * int * byte[] -> int
override this.OnRead : int64 * int * byte[] -> int
Parameters
- offset
- Int64
Offset in bytes from the file head specifying where to read bytes. If a seek operation is conducted on the file descriptor, then a read operation is requested, the offset refrects the proper position of requested bytes.
- size
- Int32
Size for read bytes.
- data
- Byte[]
Byte array to store read bytes.
Returns
Size of bytes returned by the function.
- Attributes
Remarks
Provides bytes read from file descriptor. It needs to return exact requested size of bytes unless it reaches file end.
Java documentation for android.os.ProxyFileDescriptorCallback.onRead(long, int, 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.