gpt4 book ai didi

org.apache.tools.zip.ZipOutputStream.setComment()方法的使用及代码示例

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

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

ZipOutputStream.setComment介绍

[英]Set the file comment.
[中]设置文件注释。

代码示例

代码示例来源:origin: org.apache.ant/ant

zOut.setComment(comment);

代码示例来源:origin: GaoFeiGit/xutils

zos.setComment(comments);

代码示例来源:origin: GaoFeiGit/xutils

zos.setComment(comments);

代码示例来源:origin: com.github.tianjing/tgtools.core

private static ZipOutputStream createZipOutputStream(OutputStream p_OutputSteam,String p_Comment)
{
  CheckedOutputStream csum = new CheckedOutputStream(p_OutputSteam,
      new CRC32());
  ZipOutputStream zos = new ZipOutputStream(csum);
  // 支持中文
  zos.setEncoding("GBK");
  // 设置压缩包注释
  zos.setComment(p_Comment);
  // 启用压缩
  zos.setMethod(ZipOutputStream.DEFLATED);
  // 压缩级别为最强压缩,但时间要花得多一点
  zos.setLevel(Deflater.BEST_COMPRESSION);
  return zos;
}

代码示例来源:origin: com.github.tianjing/tgtools.core

out = new BufferedOutputStream(zos);
zos.setComment(comment);

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