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

x33g5p2x  于2022-02-05 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(135)

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

ZipEntry.hashCode介绍

[英]Returns the hash code for this ZipEntry.
[中]返回此ZipEntry的哈希代码。

代码示例

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

@Override
public int hashCode() {
  return 7919 * codeBase.hashCode() + zipEntry.hashCode();
}

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

@Override
public int hashCode() {
  return 7919 * codeBase.hashCode() + zipEntry.hashCode();
}

代码示例来源:origin: org.kuali.rice/rice-core-api

public int hashCode() {
  return zipEntry.hashCode();
}
public boolean equals(Object o) {

代码示例来源:origin: org.graniteds/granite-client-java

@Override
  public int hashCode() {
    return file.hashCode() + (31 * entry.hashCode());
  }
}

代码示例来源:origin: org.graniteds/granite-client

@Override
  public int hashCode() {
    return file.hashCode() + (31 * entry.hashCode());
  }
}

代码示例来源:origin: org.graniteds/granite-server

@Override
  public int hashCode() {
    return file.hashCode() + (31 * entry.hashCode());
  }
}

代码示例来源:origin: org.graniteds/granite-client-javafx

@Override
  public int hashCode() {
    return file.hashCode() + (31 * entry.hashCode());
  }
}

代码示例来源:origin: com.google.code.findbugs/findbugs

@Override
public int hashCode() {
  return 7919 * codeBase.hashCode() + zipEntry.hashCode();
}

代码示例来源:origin: com.google.code.findbugs/findbugs

@Override
public int hashCode() {
  return 7919 * codeBase.hashCode() + zipEntry.hashCode();
}

代码示例来源:origin: be.fedict.eid-dss/eid-dss-document-zip

private String getResourceId(ZipEntry zipEntry) {
  return String.valueOf(zipEntry.hashCode());
}

代码示例来源:origin: igniterealtime/Spark

private boolean checkIfSameFile(File oldZip, File newZip){
  boolean result = true;
  ZipFile oldZipFile = null;
  ZipFile newZipFile = null;
  try {
    oldZipFile = new JarFile(oldZip);
    newZipFile = new JarFile(newZip);
    if (oldZipFile.size() == newZipFile.size()){
      for (Enumeration<?> e = newZipFile.entries(); e.hasMoreElements();) {
        JarEntry entry = (JarEntry) e.nextElement();
        if (oldZipFile.getEntry(entry.getName()) == null ||
            entry.hashCode() != oldZipFile.getEntry(entry.getName()).hashCode()){
          result = false;
          break;
        }
      }  
    }else{
      result = false;
    }
  } catch (IOException e) {
    Log.error(e);
  }
  closeFile( newZipFile );
  closeFile( oldZipFile );
  return result;
}

相关文章