Freigeben über


MtpDevice.GetPartialObject64(Int32, Int64, Int64, Byte[]) Method

Definition

Obtains object bytes in the specified range and writes it to an array.

[Android.Runtime.Register("getPartialObject64", "(IJJ[B)J", "", ApiSince=24)]
public long GetPartialObject64 (int objectHandle, long offset, long size, byte[] buffer);
[<Android.Runtime.Register("getPartialObject64", "(IJJ[B)J", "", ApiSince=24)>]
member this.GetPartialObject64 : int * int64 * int64 * byte[] -> int64

Parameters

objectHandle
Int32

handle of the object to read

offset
Int64

Start index of reading range. It must be a non-negative value.

size
Int64

Size of reading range. It must be a non-negative value at most Integer.MAX_VALUE.

buffer
Byte[]

Array to write data.

Returns

Size of bytes that are actually read.

Attributes

Remarks

Obtains object bytes in the specified range and writes it to an array. This call may block for an arbitrary amount of time depending on the size of the data and speed of the devices.

This is a vender-extended operation supported by Android that enables us to pass unsigned 64-bit offset. Check if the MTP device supports the operation by using MtpDeviceInfo#getOperationsSupported().

Java documentation for android.mtp.MtpDevice.getPartialObject64(int, long, long, 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