gpt4 book ai didi

net.lingala.zip4j.model.ZipParameters.setSourceExternalStream()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 16:54:40 28 4
gpt4 key购买 nike

本文整理了Java中net.lingala.zip4j.model.ZipParameters.setSourceExternalStream()方法的一些代码示例,展示了ZipParameters.setSourceExternalStream()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipParameters.setSourceExternalStream()方法的具体详情如下:
包路径:net.lingala.zip4j.model.ZipParameters
类名称:ZipParameters
方法名:setSourceExternalStream

ZipParameters.setSourceExternalStream介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

public void EmployeeEncyrptedZipFileDownload(HttpServletResponse response, @RequestParam(value = "id", required = true) int employeeId) throws IOException, ZipException
{
  //Prepare text file contents
  String fileContent = "Hallo Welt";

  response.setContentType("application/zip");
  response.setHeader("Content-Disposition", "attachment;filename=test.zip");

  final StringBuilder sb = new StringBuilder(fileContent);
  final ZipOutputStream zout = new ZipOutputStream(response.getOutputStream());

  ZipParameters zipParameters = new ZipParameters();
  zipParameters.setSourceExternalStream(true);
  zipParameters.setFileNameInZip("mytext.txt");

  zout.putNextEntry(null, zipParameters);
  byte[] data = sb.toString().getBytes();
  zout.write(data, 0, data.length);

  zout.closeEntry();
  zout.finish();
}

代码示例来源:origin: stackoverflow.com

zipParams.setEncryptionMethod(Zip4jConstants.ENC_METHOD_STANDARD);
zipParams.setPassword(pass);
zipParams.setSourceExternalStream(true);
zipParams.setFileNameInZip(fileName);

代码示例来源:origin: io.macgyver/macgyver-core

zp.setSourceExternalStream(true);
zp.setFileNameInZip(it.getName().replace(".",
    "/") + ".class");

代码示例来源:origin: com.tomitribe.tribestream/tribestream-container

for (final FileContent c : content.contents) {
  try (final InputStream stream = new ByteArrayInputStream(c.content)) {
    parameters.setSourceExternalStream(true);
    parameters.setFileNameInZip(c.name);
    zip.addStream(stream, parameters);

代码示例来源:origin: MCMrARM/revolution-irc

params.setPassword(password);
params.setSourceExternalStream(true);

代码示例来源:origin: org.jboss.forge.addon/resources-impl

parameters.setSourceExternalStream(true);
try (InputStream stream = resource.getResourceInputStream())

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com