Class FileWriteTask
- java.lang.Object
-
- com.pranavpandey.android.dynamic.util.concurrent.DynamicRunnable<T,P,R>
-
- com.pranavpandey.android.dynamic.util.concurrent.DynamicTask<T,P,R>
-
- com.pranavpandey.android.dynamic.util.concurrent.task.ContextTask<java.lang.Void,java.lang.Void,java.lang.Boolean>
-
- com.pranavpandey.android.dynamic.util.concurrent.task.FileWriteTask
-
- All Implemented Interfaces:
java.lang.Runnable
public class FileWriteTask extends ContextTask<java.lang.Void,java.lang.Void,java.lang.Boolean>
ADynamicTaskto write a fileUrifrom source to the destination.
-
-
Constructor Summary
Constructors Constructor Description FileWriteTask(android.content.Context context, android.net.Uri source, android.net.Uri destination)Constructor to initialize an object of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.BooleandoInBackground(java.lang.Void params)This method will be called for doing the background work.android.net.UrigetDestination()Get the destination URI used by this task.android.net.UrigetSource()Get the source URI used by this task.-
Methods inherited from class com.pranavpandey.android.dynamic.util.concurrent.task.ContextTask
getContext
-
Methods inherited from class com.pranavpandey.android.dynamic.util.concurrent.DynamicTask
cancel, execute, execute, executeOnExecutor, executeOnExecutor, finish, get, get, getBooleanResult, getHandler, getStatus, isCancelled, publishProgress, run
-
Methods inherited from class com.pranavpandey.android.dynamic.util.concurrent.DynamicRunnable
onCancelled, onCancelled, onPostExecute, onPreExecute, onProgressUpdate
-
-
-
-
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:DynamicRunnableThis method will be called for doing the background work.- Specified by:
doInBackgroundin classDynamicRunnable<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.
-
-