. Net/C #: implement the Http Web client tool class that supports resumable multi-thread download (C # DIY Ht
Source: Internet
Author: User
/*. Net/C #: implement the Http Web client tool class that supports resumable download of multiple threads (C # DIY HttpWebClient)
* Reflector: the System. Net. WebClient is reloaded or added:
* DownLoad and Upload methods!
* Great changes to DownLoad!
* Added DataReceive and predictionoccurrs events!
* For more information about the HTTP protocol used for server-client interaction, see:
* Enables custom connections for file downloads to support resumable multi-thread download of FlashGet! JSP/Servlet implementation!
* Http://blog.111cn.net/playyuer/archive/2004/08/02/58430.aspx
* Enables custom connections for file downloads to support resumable multi-thread download of FlashGet! C #/ASP. Net implementation!
* Http://blog.111cn.net/playyuer/archive/2004/08/02/58281.aspx
*/
Namespace Microshaoft. Utils
{
Using System;
Using System. IO;
Using System. Net;
Using System. Text;
Using System. Security;
Using System. Threading;
Using System. Collections. Specialized;
/// <Summary>
/// Record the location of the downloaded byte
/// </Summary>
Public class DownLoadState
{
Private string _ FileName;
Private string _ AttachmentName;
Private int _ Position;
Private string _ RequestURL;
Private string _ ResponseURL;
Private int _ Length;
Private byte [] _ Data;
Public string FileName
{
Get
{
Return _ FileName;
}
}
Public int Position
{
Get
{
Return _ Position;
}
}
Public int Length
{
Get
{
Return _ Length;
}
}
Public string AttachmentName
{
Get
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.