http Resume method
Return to Introduction  Previous page  Next page
Applies to
WinHTTP component.  

Declaration
procedure Resume;  

Description
The Resume method used to resume downloading of data to some file specified in the OutputFileName property.  
 
After calling of this method, the component determinates the size of file specified in the OutputFileName, and initiates downloading of the rest of broken or paused download, to append the rest of data to the end of local file.  
 
tip The WinHTTP automatically uses simple and smart scheme of checking whether the file which you're trying to Resume has been updated or modified. Before downloading of the data which should be appended, it downloads small data chunk (with size specified in TransferBufferSize property), before the break, and compares with the same data chunk at the end of file.  
 
In case if compared data are equal — it continue downloading and append downloaded data to the end of local file. Otherwise it assume that file which beging downloaded has been changed, and starts download from beginning.  
 
By default TransferBufferSize = 4Kb, so every time when you call Resume method, the component download 4Kb of extra "rollback" data to check file consistancy.  

Note
iiinfo Use Resume method only if you downloading the data to file, specified in the OutputFileName property. Otherwise, in case if file name not specified, it will download some object from the Web from beginning. Effect will be the same as you calling Read method.  
 
tip You can use Resume method instead of Read. In case if file does not exists — Resume method will create it and download some file from beginning.  

See also
OutputFileName, CacheOptions and TransferBufferSize properties;  
Read, Pause and Abort methods.