gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-15 20:32:40 26 4
gpt4 key购买 nike

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

ZipEntry.setSize介绍

[英]Sets the uncompressed size of the entry data.
[中]设置输入数据的未压缩大小。

代码示例

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

/**
 * Creates a new zip entry taking some information from the given
 * file and using the provided name.
 *
 * <p>The name will be adjusted to end with a forward slash "/" if
 * the file is a directory.  If the file is not a directory a
 * potential trailing forward slash will be stripped from the
 * entry name.</p>
 *
 * @param inputFile File
 * @param entryName String
 */
public ZipEntry(final File inputFile, final String entryName) {
  this(inputFile.isDirectory() && !entryName.endsWith("/") ? entryName + "/" : entryName);
  if (inputFile.isFile()) {
    setSize(inputFile.length());
  }
  setTime(inputFile.lastModified());
  // TODO are there any other fields we can set here?
}

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

} while (count != -1);
markableInputStream.reset();
ze.setSize(size);
ze.setCrc(cal.getValue());

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

entry.entry.setSize(entry.bytesRead);
entry.entry.setCompressedSize(bytesWritten);
entry.entry.setCrc(crc);
entry.entry.setSize(bytesWritten);
entry.entry.setCompressedSize(bytesWritten);
entry.entry.setCrc(crc);

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

ze.setTime(System.currentTimeMillis() + millisToAdd);
ze.setSize(0);
ze.setMethod(ZipEntry.STORED);

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

ze.setSize(z64.getSize().getLongValue());
} else if (hasCompressedSize) {
  z64.setSize(new ZipEightByteInteger(ze.getSize()));

代码示例来源:origin: hyperic/hq

private void addFile (org.apache.tools.zip.ZipEntry entry,
             ZipOutputStream zip_out,
             InputStream in,
             long size,
             byte[] buf) throws IOException {

    entry.setTime(System.currentTimeMillis());
    entry.setSize(size);
    zip_out.putNextEntry(entry);
    FileUtil.copyStream(in, zip_out, buf);
    zip_out.closeEntry();
  }
}

代码示例来源:origin: com.github.javahaohao/utils

ze.setSize(file.length());
ze.setTime(file.lastModified());
  ze.setSize(f.length());
  ze.setTime(f.lastModified());

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