com.android.apkzlib.zip.ZFileOptions.<init>()方法的使用及代码示例

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

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

ZFileOptions.<init>介绍

[英]Creates a new options object. All options are set to their defaults.
[中]创建一个新的选项对象。所有选项都设置为默认值。

代码示例

代码示例来源:origin: com.android.tools.build/builder

/**
 * Creates a new zip file. If the zip file does not exist, then no file is created at this
 * point and {@code ZFile} will contain an empty structure. However, an (empty) zip file will
 * be created if either {@link #update()} or {@link #close()} are used. If a zip file exists,
 * it will be parsed and read.
 *
 * @param file the zip file
 * @throws IOException some file exists but could not be read
 */
public ZFile(@Nonnull File file) throws IOException {
  this(file, new ZFileOptions());
}

代码示例来源:origin: com.android.tools.build/gradle-core

boolean keepTimestamps = AndroidGradleOptions.keepTimestampsInApk(project);
ZFileOptions options = new ZFileOptions();
options.setNoTimestamps(!keepTimestamps);
options.setCoverEmptySpaceUsingExtraField(true);

相关文章