Class FileWriteTask

  • All Implemented Interfaces:
    java.lang.Runnable

    public class FileWriteTask
    extends ContextTask<java.lang.Void,​java.lang.Void,​java.lang.Boolean>
    A DynamicTask to write a file Uri from source to the destination.
    • Constructor Detail

      • FileWriteTask

        public FileWriteTask​(@Nullable
                             android.content.Context context,
                             @Nullable
                             android.net.Uri source,
                             @Nullable
                             android.net.Uri destination)
        Constructor to initialize an object of this class.
        Parameters:
        context - The context to get the content resolver.
        source - The URI of the source file.
        destination - The URI of the destination file.
        See Also:
        ContentResolver
    • Method Detail

      • doInBackground

        @Nullable
        protected java.lang.Boolean doInBackground​(@Nullable
                                                   java.lang.Void params)
        Description copied from class: DynamicRunnable
        This method will be called for doing the background work.
        Specified by:
        doInBackground in class DynamicRunnable<java.lang.Void,​java.lang.Void,​java.lang.Boolean>
        Parameters:
        params - The optional parameters required for the work.
        Returns:
        The optional result object.
      • getSource

        @Nullable
        public android.net.Uri getSource()
        Get the source URI used by this task.
        Returns:
        The source URI used by this task.
      • getDestination

        @Nullable
        public android.net.Uri getDestination()
        Get the destination URI used by this task.
        Returns:
        The destination URI used by this task.