gpt4 book ai didi

org.apache.commons.compress.archivers.zip.ZipArchiveEntry.getTime()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 09:42:40 26 4
gpt4 key购买 nike

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

ZipArchiveEntry.getTime介绍

暂无

代码示例

代码示例来源:origin: org.apache.commons/commons-compress

/**
 * Wraps {@link java.util.zip.ZipEntry#getTime} with a {@link Date} as the
 * entry's last modified date.
 *
 * <p>Changes to the implementation of {@link java.util.zip.ZipEntry#getTime}
 * leak through and the returned value may depend on your local
 * time zone as well as your version of Java.</p>
 */
@Override
public Date getLastModifiedDate() {
  return new Date(getTime());
}

代码示例来源:origin: org.apache.commons/commons-compress

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

代码示例来源:origin: org.apache.poi/poi-ooxml

zeNew.setComment(ze.getComment());
zeNew.setExtra(ze.getExtra());
zeNew.setTime(ze.getTime());

代码示例来源:origin: org.apache.commons/commons-compress

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

代码示例来源:origin: org.codehaus.plexus/plexus-archiver

@Override
public long getLastModified()
{
  final long l = zipEntry.getTime();
  return l == 0 ? PlexusIoResource.UNKNOWN_MODIFICATION_DATE : l;
}

代码示例来源:origin: org.apache.commons/commons-compress

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

代码示例来源:origin: org.apache.commons/commons-compress

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

代码示例来源:origin: org.apache.poi/poi-ooxml

ZipArchiveEntry zeOut = new ZipArchiveEntry(ze.getName());
zeOut.setSize(ze.getSize());
zeOut.setTime(ze.getTime());
zos.putArchiveEntry(zeOut);
try (final InputStream is = zipEntrySource.getInputStream(ze)) {

代码示例来源:origin: org.codehaus.plexus/plexus-archiver

private ZipFileResource( JarFile jarFile, ZipArchiveEntry entry )
{
  super( entry.getName(),
      entry.getTime() == -1 ? PlexusIoResource.UNKNOWN_MODIFICATION_DATE : entry.getTime(),
      entry.isDirectory() ? PlexusIoResource.UNKNOWN_RESOURCE_SIZE : entry.getSize(),
      !entry.isDirectory(), entry.isDirectory(), true );
  this.jarFile = jarFile;
}

代码示例来源:origin: io.takari/takari-archiver

@Override
 public long getTime() {
  return archiveEntry.getTime();
 }
}

代码示例来源:origin: org.codehaus.plexus/plexus-archiver

ze.getName(), new Date( ze.getTime() ), ze.isDirectory(),
ze.getUnixMode() != 0 ? ze.getUnixMode() : null,
resolveSymlink( zipFile, ze ), getFileMappers() );

代码示例来源:origin: com.atlassian.jira/jira-core

@Override
public Date getModifiedDate()
{
  return new Date(zipEntry.getTime());
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Wraps {@link java.util.zip.ZipEntry#getTime} with a {@link Date} as the
 * entry's last modified date.
 *
 * <p>Changes to the implementation of {@link java.util.zip.ZipEntry#getTime}
 * leak through and the returned value may depend on your local
 * time zone as well as your version of Java.</p>
 */
@Override
public Date getLastModifiedDate() {
  return new Date(getTime());
}

代码示例来源:origin: org.codehaus.plexus/plexus-archiver

new Date( ze.getTime() ), ze.isDirectory(),
ze.getUnixMode() != 0 ? ze.getUnixMode() : null,
resolveSymlink( zf, ze ), getFileMappers() );

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

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

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

private void copyZipEntry(ZipFile zipFile, ZipArchiveEntry entry, File copyTo, String key) throws IOException {
  Cacheable forCache = new Cacheable(entry.getName(), entry.getTime());
  log.debug("Checking whether {} is up to date at {}", entry.getName(), copyTo);
  // Check for modification
  if (!copyTo.exists() || !cache.isUpToDate(key, forCache)) {
    log.debug("Up to date check failed, copying {} to {}", entry.getName(), copyTo);
    ensureIsDirectory(copyTo.getParentFile());
    copyAndClose(zipFile.getInputStream(entry), copyTo);
    if (SystemUtils.IS_OS_UNIX) {
      int mode = entry.getUnixMode();
      if (mode > 0) {
        Files.setPosixFilePermissions(copyTo.toPath(), toPerms(mode));
      }
    }
    cache.put(key, forCache);
  }
}

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

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

代码示例来源:origin: ZuInnoTe/hadoopoffice

zeNew.setComment(ze.getComment());
zeNew.setExtra(ze.getExtra());
zeNew.setTime(ze.getTime());
zos.putArchiveEntry(zeNew);
FilterOutputStream fos2 = new FilterOutputStream(zos) {

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

zeNew.setComment(ze.getComment());
zeNew.setExtra(ze.getExtra());
zeNew.setTime(ze.getTime());

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

ZipArchiveEntry zeOut = new ZipArchiveEntry(ze.getName());
zeOut.setSize(ze.getSize());
zeOut.setTime(ze.getTime());
zos.putArchiveEntry(zeOut);
try (final InputStream is = zipEntrySource.getInputStream(ze)) {

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