gpt4 book ai didi

net.lingala.zip4j.core.ZipFile.getFileHeader()方法的使用及代码示例

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

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

ZipFile.getFileHeader介绍

[英]Returns FileHeader if a file header with the given fileHeader string exists in the zip model: If not returns null
[中]如果zip模型中存在具有给定FileHeader字符串的文件头,则返回FileHeader:如果不是,则返回null

代码示例

代码示例来源:origin: MCMrARM/revolution-irc

public static boolean verifyBackupFile(File file) {
  try {
    ZipFile zipFile = new ZipFile(file);
    FileHeader preferences = zipFile.getFileHeader(BACKUP_PREFERENCES_PATH);
    FileHeader notificationRules = zipFile.getFileHeader(BACKUP_NOTIFICATION_RULES_PATH);
    FileHeader commandAliases = zipFile.getFileHeader(BACKUP_COMMAND_ALIASES_PATH);
    return preferences != null && notificationRules != null && commandAliases != null;
  } catch (ZipException e) {
    e.printStackTrace();
    return false;
  }
}

代码示例来源:origin: MCMrARM/revolution-irc

zipFile.getFileHeader(BACKUP_PREFERENCES_PATH))));
importPreferencesFromJson(context, reader);
reader.close();
    zipFile.getFileHeader(BACKUP_NOTIFICATION_RULES_PATH))));
NotificationRuleManager.loadUserRuleSettings(reader);
reader.close();
    zipFile.getFileHeader(BACKUP_COMMAND_ALIASES_PATH))));
CommandAliasManager aliasManager = CommandAliasManager.getInstance(context);
aliasManager.loadUserSettings(reader);

代码示例来源:origin: MCMrARM/revolution-irc

public static boolean isBackupPasswordProtected(File file) {
  try {
    ZipFile zipFile = new ZipFile(file);
    FileHeader preferences = zipFile.getFileHeader(BACKUP_PREFERENCES_PATH);
    return preferences.isEncrypted();
  } catch (ZipException e) {
    e.printStackTrace();
    return false;
  }
}

代码示例来源:origin: org.jboss.forge.addon/resources-impl

@Override
public Resource<?> getChild(String name)
{
 FileHeader fileHeader;
 try
 {
   fileHeader = zipFile.getFileHeader(name);
 }
 catch (ZipException e)
 {
   throw new ResourceException("Error while fetching file header", e);
 }
 return (fileHeader == null) ? null : new ZipFileResourceEntryImpl(getResourceFactory(), this, fileHeader);
}

代码示例来源:origin: org.molgenis/molgenis-apps

if (!app.getUseFreemarkerTemplate())
  FileHeader fileHeader = zipFile.getFileHeader("index.html");
  if (fileHeader == null)

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