gpt4 book ai didi

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

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

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

ZipEntry.getTime介绍

暂无

代码示例

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

/** {@inheritDoc} */
public Date getLastModifiedDate() {
  return new Date(getTime());
}

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

/**
 * Provides default values for compression method and last
 * modification time.
 *
 * @param entry ZipEntry
 */
private void setDefaults(ZipEntry entry) {
  if (entry.getMethod() == -1) { // not specified
    entry.setMethod(method);
  }
  if (entry.getTime() == -1) { // not specified
    entry.setTime(System.currentTimeMillis());
  }
}

代码示例来源:origin: jenkinsci/jenkins

LOGGER.log(Level.WARNING, "unable to set permissions", ex);
f.setLastModified(e.getTime());

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

extractFile(fileUtils, srcF, dir,
        ze.getName(), new Date(ze.getTime()),
        ze.isDirectory(), mapper);
} finally {

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

ZipUtil.toDosTime(calendarInstance, ze.getTime(), buf, LFH_TIME_OFFSET);

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

/**
 * Add a file entry.
 */
private void addResource(final Resource r, final String name, final String prefix,
             final ZipOutputStream zOut, final int mode,
             final ZipFile zf, final File fromArchive)
  throws IOException {
  if (zf != null) {
    final ZipEntry ze = zf.getEntry(r.getName());
    if (ze != null) {
      final boolean oldCompress = doCompress;
      if (keepCompression) {
        doCompress = (ze.getMethod() == ZipEntry.DEFLATED);
      }
      try (final BufferedInputStream is = new BufferedInputStream(zf.getInputStream(ze))) {
        zipFile(is, zOut, prefix + name, ze.getTime(),
            fromArchive, mode, ze.getExtraFields(true));
      } finally {
        doCompress = oldCompress;
      }
    }
  } else {
    try (final BufferedInputStream is = new BufferedInputStream(r.getInputStream())) {
      zipFile(is, zOut, prefix + name, r.getLastModified(),
          fromArchive, mode, r instanceof ZipResource
          ? ((ZipResource) r).getExtraFields() : null);
    }
  }
}

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

otherComment = "";
return getTime() == other.getTime()
  && myComment.equals(otherComment)
  && getInternalAttributes() == other.getInternalAttributes()

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

ZipUtil.toDosTime(calendarInstance, ze.getTime(), buf, CFH_TIME_OFFSET);

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

private void setEntry(ZipEntry e) {
  if (e == null) {
    setExists(false);
    return;
  }
  setName(e.getName());
  setExists(true);
  setLastModified(e.getTime());
  setDirectory(e.isDirectory());
  setSize(e.getSize());
  setMode(e.getUnixMode());
  extras = e.getExtraFields(true);
  method = e.getMethod();
}

代码示例来源:origin: org.gradle/gradle-core

public long getLastModified() {
  return entry.getTime();
}

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

.append(" KB!").append("\r\n");
} else {
  long entrytime = entry.getTime();
  long localtime = destFile.lastModified();
  long entrysize = entry.getSize();
    fileOut.close();
    inputStream.close();
    destFile.setLastModified(entry.getTime());

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

LOGGER.log(Level.WARNING, "unable to set permissions", ex);
f.setLastModified(e.getTime());

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