gpt4 book ai didi

java.util.zip.ZipFile.getComment()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 01:20:40 34 4
gpt4 key购买 nike

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

ZipFile.getComment介绍

[英]Returns this file's comment, or null if it doesn't have one. See ZipOutputStream#setComment.
[中]返回此文件的注释,如果没有注释,则返回null。请参见ZipoutStream#setComment。

代码示例

代码示例来源:origin: linghaolu/apkcomment

String comment = zipFile.getComment();

代码示例来源:origin: ujmp/universal-java-matrix-package

public ZipFileMatrix(File file) throws ZipException, IOException {
  // must be this charset, otherwise a strange exception will occur
  this.zipFile = new ZipFile(file, Charset.forName("Cp437"));
  setLabel(zipFile.getName());
  setMetaData("Comment", zipFile.getComment());
}

代码示例来源:origin: open-eid/digidoc4j

@Override
protected void parseContainer() {
 logger.debug("Parsing zip file");
 try {
  String zipFileComment = zipFile.getComment();
  setZipFileComment(zipFileComment);
  parseZipFileManifest();
  Enumeration<? extends ZipEntry> entries = zipFile.entries();
  while (entries.hasMoreElements()) {
   ZipEntry zipEntry = entries.nextElement();
   parseEntry(zipEntry);
  }
 } finally {
  IOUtils.closeQuietly(zipFile);
 }
}

代码示例来源:origin: LiqiNew/MyUtils

try {
  zf = new ZipFile(new File(zipFilePath));
  byte[] bytes = zf.getComment().getBytes("GB2312");
  byteToString = new String(bytes, "8859_1");
} catch (IOException e) {

代码示例来源:origin: jtransc/jtransc

ZipFile zipFile = new ZipFile(tmpfile);
System.out.println(normalizePath(zipFile.getName()));
System.out.println(zipFile.getComment());
System.out.println(zipFile.getEntry("hello.txt"));
JTranscConsole.log("[d]");

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

Files.newOutputStream(newZipFilePath)))) {
String comment = oldZipFile.getComment();
if (comment != null) {
  newZipFile.setComment(comment);

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