gpt4 book ai didi

com.android.apkzlib.zip.ZFileOptions类的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 11:31:24 62 4
gpt4 key购买 nike

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

ZFileOptions介绍

[英]Options to create a ZFile.
[中]创建ZFile的选项。

代码示例

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

/**
 * Creates a new zip file configured as an apk, based on a given file.
 *
 * @param f the file, if this path does not represent an existing path, will create a
 * {@link ZFile} based on an non-existing path (a zip will be created when
 * {@link ZFile#close()} is invoked)
 * @param options the options to create the {@link ZFile}
 * @return the zip file
 * @throws IOException failed to create the zip file
 */
@Nonnull
public static ZFile apk(@Nonnull File f, @Nonnull ZFileOptions options) throws IOException {
  options.setAlignmentRule(
      AlignmentRules.compose(options.getAlignmentRule(), APK_DEFAULT_RULE));
  return new ZFile(f, options);
}

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

boolean keepTimestamps = AndroidGradleOptions.keepTimestampsInApk(project);
ZFileOptions options = new ZFileOptions();
options.setNoTimestamps(!keepTimestamps);
options.setCoverEmptySpaceUsingExtraField(true);
options.setSkipDataDescriptionValidation(true);
  options.setCompressor(
      new DeflateExecutionCompressor(
          compressionExecutor,
          options.getTracker(),
          Deflater.BEST_SPEED));
} else {
  options.setCompressor(
      new BestAndDefaultDeflateExecutorCompressor(
          compressionExecutor,
          options.getTracker(),
          1.0));
  options.setAutoSortFiles(true);

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

mMap = new FileUseMap(
    0,
    options.getCoverEmptySpaceUsingExtraField()
        ? MINIMUM_EXTRA_FIELD_SIZE
        : 0);
mDirty = false;
mClosedControl = null;
mAlignmentRule = options.getAlignmentRule();
mExtensions = Lists.newArrayList();
mToRun = Lists.newArrayList();
mNoTimestamps = options.getNoTimestamps();
mTracker = options.getTracker();
mCompressor = options.getCompressor();
mCoverEmptySpaceUsingExtraField = options.getCoverEmptySpaceUsingExtraField();
mAutoSortFiles = options.getAutoSortFiles();
mSkipDataDescriptorVerification = options.getSkipDataDescriptorValidation();

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

creationData.getNoCompressPredicate().or(
          name -> name.endsWith(NATIVE_LIBRARIES_SUFFIX));
  options.setAlignmentRule(
      AlignmentRules.compose(SO_RULE, options.getAlignmentRule()));
  break;
default:

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