public interface ApkCreator
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
deleteFile(java.lang.String apkPath)
Deletes a file in a given path.
|
boolean |
hasPendingChangesWithWait()
Returns true if the APK will be rewritten on close.
|
void |
writeFile(java.io.File inputFile,
java.lang.String apkPath)
Writes a new
File into the archive. |
void |
writeZip(java.io.File zip,
java.util.function.Function<java.lang.String,java.lang.String> transform,
java.util.function.Predicate<java.lang.String> isIgnored)
Copies the content of a Jar/Zip archive into the receiver archive.
|
void writeZip(@Nonnull
java.io.File zip,
@Nullable
java.util.function.Function<java.lang.String,java.lang.String> transform,
@Nullable
java.util.function.Predicate<java.lang.String> isIgnored)
throws java.io.IOException
An optional predicate allows to selectively choose which files to copy over and an option function allows renaming the files as they are copied.
zip - the zip to copy data fromtransform - an optional transform to apply to file names before copying themisIgnored - an optional filter or null to mark which out files should not be
added, even through they are on the zip; if transform is specified, then this
predicate applies after transformationjava.io.IOException - I/O errorvoid writeFile(@Nonnull
java.io.File inputFile,
@Nonnull
java.lang.String apkPath)
throws java.io.IOException
File into the archive. If a file already existed with the given
path, it should be replaced.inputFile - the File to write.apkPath - the filepath inside the archive.java.io.IOException - I/O errorvoid deleteFile(@Nonnull
java.lang.String apkPath)
throws java.io.IOException
apkPath - the path to removejava.io.IOException - failed to remove the entryboolean hasPendingChangesWithWait()
throws java.io.IOException
java.io.IOException