Skip to content

Commit

Permalink
Merge pull request android-async-http#960 from dupengtao/master
Browse files Browse the repository at this point in the history
download file with work thread
  • Loading branch information
smarek committed Sep 16, 2015
2 parents a8bb750 + f46bea5 commit 5be1faf
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,20 @@ public FileAsyncHttpResponseHandler(File file, boolean append) {
* @param renameTargetFileIfExists whether target file should be renamed if it already exists
*/
public FileAsyncHttpResponseHandler(File file, boolean append, boolean renameTargetFileIfExists) {
super();
this(file,append,renameTargetFileIfExists,false);
}


/**
* Obtains new FileAsyncHttpResponseHandler and stores response in passed file
*
* @param file File to store response within, must not be null
* @param append whether data should be appended to existing file
* @param renameTargetFileIfExists whether target file should be renamed if it already exists
* @param usePoolThread Whether to use the pool's thread to fire callbacks
*/
public FileAsyncHttpResponseHandler(File file, boolean append, boolean renameTargetFileIfExists,boolean usePoolThread) {
super(usePoolThread);
Utils.asserts(file != null, "File passed into FileAsyncHttpResponseHandler constructor must not be null");
if (!file.isDirectory() && !file.getParentFile().isDirectory()) {
Utils.asserts(file.getParentFile().mkdirs(), "Cannot create parent directories for requested File location");
Expand Down

0 comments on commit 5be1faf

Please sign in to comment.