<commit_before>package cn.byhieg.betterload.download;

import java.util.List;

/**
 * Created by byhieg on 17/3/13.
 * Contact with <EMAIL>
 */

public class DownLoadRequest {

    private DownLoadHandle downLoadHandle;

    private List<DownLoadEntity> list;

    public DownLoadRequest(List<DownLoadEntity> list){
        this.list = list;
    }


    public void start(){
        List<DownLoadEntity> queryList = 
    }
}<commit_msg>添加DownLoadRequest的代码<commit_after>package cn.byhieg.betterload.download;

import java.util.Iterator;
import java.util.List;

import cn.byhieg.betterload.utils.FailureMessage;

/**
 * Created by byhieg on 17/3/13.
 * Contact with <EMAIL>
 */

public class DownLoadRequest {

    private DownLoadHandle downLoadHandle;

    private List<DownLoadEntity> list;
    private FailureMessage failMessage;

    private IDownLoadListener listener;

    public DownLoadRequest(List<DownLoadEntity> list,IDownLoadListener listener){
        this.list = list;
        this.listener = listener;
        failMessage = new FailureMessage();
    }


    public void start(){
        List<DownLoadEntity> queryList = downLoadHandle.queryDownLoadInfo(list);
        Iterator it = queryList.iterator();
        long totalFileSize = 0;
        long hasDownSize = 0;

        while (it.hasNext()) {
            final DownLoadEntity entry = (DownLoadEntity) it.next();
            hasDownSize += entry.getDownedData();
            if (entry.getTotal() == 0) {
                failMessage.clear();
                failMessage.setFailureMessage("文件读取失败");
                failMessage.setResultCode(-1);
                listener.onError(entry,failMessage);
                return;
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.09814169570267131, 'fraction_numerical': 0.008130081300813009, 'mean_word_length': 2.6350210970464136, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4232561', 'n_tokens_mistral': 523, 'n_tokens_neox': 491, 'n_words': 105}