// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package org.jeecg.modules.doc.component; import com.aliyun.oss.OSS; import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.IOUtils; import org.jeecg.modules.doc.vo.DownloadFile; public abstract class Downloader { public Downloader() { } public void download(HttpServletResponse httpServletResponse, DownloadFile downloadFile) { InputStream inputStream = this.getInputStream(downloadFile); ServletOutputStream outputStream = null; boolean var10 = false; OSS ossClient; label73: { try { var10 = true; outputStream = httpServletResponse.getOutputStream(); IOUtils.copyLarge(inputStream, outputStream); var10 = false; break label73; } catch (IOException var11) { var11.printStackTrace(); var10 = false; } finally { if (var10) { IOUtils.closeQuietly(inputStream); IOUtils.closeQuietly(outputStream); ossClient = downloadFile.getOssClient(); if (ossClient != null) { ossClient.shutdown(); } } } IOUtils.closeQuietly(inputStream); IOUtils.closeQuietly(outputStream); ossClient = downloadFile.getOssClient(); if (ossClient != null) { ossClient.shutdown(); } return; } IOUtils.closeQuietly(inputStream); IOUtils.closeQuietly(outputStream); ossClient = downloadFile.getOssClient(); if (ossClient != null) { ossClient.shutdown(); } } public abstract InputStream getInputStream(DownloadFile downloadFile); }