类 DownloadFileTools

java.lang.Object
net.jlxxw.http.spider.file.DownloadFileTools

public class DownloadFileTools extends Object
  • 构造器详细资料

    • DownloadFileTools

      public DownloadFileTools(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor httpDownloadExecutor, org.springframework.beans.factory.BeanFactory beanFactory, FileProperties fileProperties, HttpConcurrencyPoolProperties httpConcurrencyPoolProperties, ProxyRestTemplatePool proxyRestTemplatePool)
      创建一个默认的下载文件服务
      参数:
      httpDownloadExecutor -
      beanFactory -
  • 方法详细资料

    • download

      public FileInfo download(String url, org.springframework.http.HttpHeaders httpHeader) throws Exception
      下载文件并返回文件基本信息
      参数:
      url - 下载连接
      httpHeader - 要增加的header,如果header存在数据,则进行覆盖
      返回:
      fileName
      抛出:
      Exception