<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ``` /** * @author 張躍帥 * @Description: 文件下載-工具 * @date 2020/08/12 */ @Slf4j public class DownloadUtil { /** * 下載文件 */ public static void download(HttpServletResponse response, File file) { // 下載文件 DownloadUtil.download(response, FileUtil.readBytes(file), file.getName()); } /** * 下載文件-自定義文件名 */ public static void download(HttpServletResponse response, File file, String fileName) { // 下載文件 DownloadUtil.download(response, FileUtil.readBytes(file), fileName); } /** * 下載文件 */ private static void download(HttpServletResponse response, byte[] fileBytes, String fileName) { try { // 設置header response.setHeader("Content-Disposition", "attachment; filename=" + URLUtil.encode(fileName)); response.addHeader("Content-Length", "" + fileBytes.length); response.setHeader("Access-Control-Allow-Origin", "*"); // 添加Access-Control-Expose-Headers,否則前端無法獲取下載的文件名稱 response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); // 設置內容類型使用"application/octet-stream"更標準 response.setContentType("application/octet-stream; charset=UTF-8"); // 寫入 IoUtil.write(response.getOutputStream(), true, fileBytes); } catch (IOException e) { log.error(">>> 下載文件失敗:{}", e.getMessage()); } } }
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看