com.github.axet.wget
Class DirectMultipart

java.lang.Object
  extended by com.github.axet.wget.Direct
      extended by com.github.axet.wget.DirectMultipart

public class DirectMultipart
extends Direct


Field Summary
static int RETRY_DELAY
           
static int THREAD_COUNT
           
 
Fields inherited from class com.github.axet.wget.Direct
BUF_SIZE, CONNECT_TIMEOUT, READ_TIMEOUT, USER_AGENT
 
Constructor Summary
DirectMultipart(DownloadInfo info, File target)
           
 
Method Summary
static boolean canResume(DownloadInfo info, File targetFile)
          check existing file for download resume.
 void download(AtomicBoolean stop, Runnable notify)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THREAD_COUNT

public static final int THREAD_COUNT
See Also:
Constant Field Values

RETRY_DELAY

public static final int RETRY_DELAY
See Also:
Constant Field Values
Constructor Detail

DirectMultipart

public DirectMultipart(DownloadInfo info,
                       File target)
Parameters:
info - download file information
target - target file
stop - multithread stop command
notify - progress notify call
Method Detail

download

public void download(AtomicBoolean stop,
                     Runnable notify)
Specified by:
download in class Direct

canResume

public static boolean canResume(DownloadInfo info,
                                File targetFile)
check existing file for download resume. for multipart download it may check all parts CRC

Parameters:
info -
targetFile -
Returns:
return true - if all ok, false - if download can not be restored.


Copyright © 2012. All Rights Reserved.