Udostępnij za pośrednictwem


MtpDevice.SendObject(Int32, Int64, ParcelFileDescriptor) Method

Definition

Copies the data for an object from a file descriptor.

[Android.Runtime.Register("sendObject", "(IJLandroid/os/ParcelFileDescriptor;)Z", "", ApiSince=24)]
public bool SendObject (int objectHandle, long size, Android.OS.ParcelFileDescriptor descriptor);
[<Android.Runtime.Register("sendObject", "(IJLandroid/os/ParcelFileDescriptor;)Z", "", ApiSince=24)>]
member this.SendObject : int * int64 * Android.OS.ParcelFileDescriptor -> bool

Parameters

objectHandle
Int32

handle of the target file

size
Int64

size of the file in bytes

descriptor
ParcelFileDescriptor

file descriptor to read the data from.

Returns

true if the file transfer succeeds

Attributes

Remarks

Copies the data for an object from a file descriptor. This call may block for an arbitrary amount of time depending on the size of the data and speed of the devices. The file descriptor is not closed on completion, and must be done by the caller.

Java documentation for android.mtp.MtpDevice.sendObject(int, long, android.os.ParcelFileDescriptor).

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