Freigeben über


FileUtils.Copy Method

Definition

Overloads

Copy(FileDescriptor, FileDescriptor)

Copy the contents of one FD to another.

Copy(Stream, Stream)

Copy the contents of one stream to another.

Copy(FileDescriptor, FileDescriptor, CancellationSignal, IExecutor, FileUtils+IProgressListener)
Copy(Stream, Stream, CancellationSignal, IExecutor, FileUtils+IProgressListener)

Copy(FileDescriptor, FileDescriptor)

Copy the contents of one FD to another.

[Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;)J", "", ApiSince=29)]
public static long Copy (Java.IO.FileDescriptor in, Java.IO.FileDescriptor out);
[<Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;)J", "", ApiSince=29)>]
static member Copy : Java.IO.FileDescriptor * Java.IO.FileDescriptor -> int64

Parameters

Returns

number of bytes copied.

Attributes

Remarks

Copy the contents of one FD to another.

Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.

Java documentation for android.os.FileUtils.copy(java.io.FileDescriptor, java.io.FileDescriptor).

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

Copy(Stream, Stream)

Copy the contents of one stream to another.

[Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;)J", "", ApiSince=29)]
public static long Copy (System.IO.Stream in, System.IO.Stream out);
[<Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;)J", "", ApiSince=29)>]
static member Copy : System.IO.Stream * System.IO.Stream -> int64

Parameters

in
Stream
out
Stream

Returns

number of bytes copied.

Attributes

Remarks

Copy the contents of one stream to another.

Attempts to use several optimization strategies to copy the data in the kernel before falling back to a userspace copy as a last resort.

Java documentation for android.os.FileUtils.copy(java.io.InputStream, java.io.OutputStream).

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

Copy(FileDescriptor, FileDescriptor, CancellationSignal, IExecutor, FileUtils+IProgressListener)

[Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)]
public static long Copy (Java.IO.FileDescriptor in, Java.IO.FileDescriptor out, Android.OS.CancellationSignal? signal, Java.Util.Concurrent.IExecutor? executor, Android.OS.FileUtils.IProgressListener? listener);
[<Android.Runtime.Register("copy", "(Ljava/io/FileDescriptor;Ljava/io/FileDescriptor;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)>]
static member Copy : Java.IO.FileDescriptor * Java.IO.FileDescriptor * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.FileUtils.IProgressListener -> int64

Parameters

executor
IExecutor

Returns

Attributes

Applies to

Copy(Stream, Stream, CancellationSignal, IExecutor, FileUtils+IProgressListener)

[Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)]
public static long Copy (System.IO.Stream in, System.IO.Stream out, Android.OS.CancellationSignal? signal, Java.Util.Concurrent.IExecutor? executor, Android.OS.FileUtils.IProgressListener? listener);
[<Android.Runtime.Register("copy", "(Ljava/io/InputStream;Ljava/io/OutputStream;Landroid/os/CancellationSignal;Ljava/util/concurrent/Executor;Landroid/os/FileUtils$ProgressListener;)J", "", ApiSince=29)>]
static member Copy : System.IO.Stream * System.IO.Stream * Android.OS.CancellationSignal * Java.Util.Concurrent.IExecutor * Android.OS.FileUtils.IProgressListener -> int64

Parameters

in
Stream
out
Stream
executor
IExecutor

Returns

Attributes

Applies to