gpt4 book ai didi

net.lingala.zip4j.exception.ZipException.printStackTrace()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 00:18:49 26 4
gpt4 key购买 nike

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

ZipException.printStackTrace介绍

暂无

代码示例

代码示例来源:origin: SpringCloud/spring-cloud-codegen

public static void main(String[] args) {
    try {
      zip("E:\\Download\\Readme", "123");
    } catch (ZipException e) {
      e.printStackTrace();
    }

    try {
      unzip("E:\\Download\\Readme.zip", "123");
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: Nepxion/Skeleton

public static void main(String[] args) {
    try {
      zip("E:\\Download\\Readme", "123");
    } catch (ZipException e) {
      e.printStackTrace();
    }

    try {
      unzip("E:\\Download\\Readme.zip", "123");
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}

代码示例来源:origin: org.phenotips/clinical-text-analysis-extension-biolark

/**
 * Unzips archive into targetDir.
 *
 * @param archive zip archive
 * @param targetDir where the archive will be extracted to
 * @throws IOException if extraction fails
 */
public static void extractArchive(File archive, File targetDir) throws IOException
{
  try {
    ZipFile zipFile = new ZipFile(archive.getAbsolutePath());
    zipFile.extractAll(targetDir.getAbsolutePath());
    // zip4j overwrites executable permissions, so we add them manually after extracting
    makeExecutable(targetDir);
  } catch (ZipException e) {
    e.printStackTrace();
  }
}

代码示例来源: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: sics-sse/moped

e.printStackTrace();
throw new MopedException("unzip: ZipException " + source, e);

代码示例来源: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: StannyBing/ZXUtils

} catch (ZipException e) {
  sendHandle(3, "解压失败,请重试");
  e.printStackTrace();

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