本文整理汇总了Java中brut.androlib.res.util.ExtFile.getDirectory方法的典型用法代码示例。如果您正苦于以下问题:Java ExtFile.getDirectory方法的具体用法?Java ExtFile.getDirectory怎么用?Java ExtFile.getDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类brut.androlib.res.util.ExtFile
的用法示例。
在下文中一共展示了ExtFile.getDirectory方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decodeRawFiles
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeRawFiles(ExtFile apkFile, File outDir)
throws AndrolibException {
LOGGER.info("Copying assets and libs...");
try {
Directory in = apkFile.getDirectory();
if (in.containsDir("assets")) {
in.copyToDir(outDir, "assets");
}
if (in.containsDir("lib")) {
in.copyToDir(outDir, "lib");
}
if (in.containsDir("libs")) {
in.copyToDir(outDir, "libs");
}
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}
示例2: recordUncompressedFiles
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void recordUncompressedFiles(ExtFile apkFile, Collection<String> uncompressedFilesOrExts) throws AndrolibException {
try {
Directory unk = apkFile.getDirectory();
Set<String> files = unk.getFiles(true);
String ext;
for (String file : files) {
if (isAPKFileNames(file) && !NO_COMPRESS_PATTERN.matcher(file).find()) {
if (unk.getCompressionLevel(file) == 0) {
ext = FilenameUtils.getExtension(file);
if (ext.isEmpty()) {
ext = file;
}
if (! uncompressedFilesOrExts.contains(ext)) {
uncompressedFilesOrExts.add(ext);
}
}
}
}
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}
示例3: decodeUnknownFiles
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeUnknownFiles(ExtFile apkFile, File outDir, ResTable resTable)
throws AndrolibException {
LOGGER.info("Copying unknown files...");
File unknownOut = new File(outDir, UNK_DIRNAME);
try {
Directory unk = apkFile.getDirectory();
// loop all items in container recursively, ignoring any that are pre-defined by aapt
Set<String> files = unk.getFiles(true);
for (String file : files) {
if (!isAPKFileNames(file) && !file.endsWith(".dex")) {
// copy file out of archive into special "unknown" folder
unk.copyToDir(unknownOut, file);
// lets record the name of the file, and its compression type
// so that we may re-include it the same way
mResUnknownFiles.addUnknownFileInfo(file, String.valueOf(unk.getCompressionLevel(file)));
}
}
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}
示例4: writeOriginalFiles
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void writeOriginalFiles(ExtFile apkFile, File outDir)
throws AndrolibException {
LOGGER.info("Copying original files...");
File originalDir = new File(outDir, "original");
if (!originalDir.exists()) {
originalDir.mkdirs();
}
try {
Directory in = apkFile.getDirectory();
if(in.containsFile("AndroidManifest.xml")) {
in.copyToDir(originalDir, "AndroidManifest.xml");
}
if (in.containsDir("META-INF")) {
in.copyToDir(originalDir, "META-INF");
}
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}
示例5: decodeManifestRaw
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeManifestRaw(ExtFile apkFile, File outDir)
throws AndrolibException {
try {
Directory apk = apkFile.getDirectory();
LOGGER.info("Copying raw manifest...");
apkFile.getDirectory().copyToDir(outDir, APK_MANIFEST_FILENAMES);
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}
示例6: decodeSourcesRaw
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeSourcesRaw(ExtFile apkFile, File outDir, boolean debug)
throws AndrolibException {
try {
Directory apk = apkFile.getDirectory();
LOGGER.info("Copying raw classes.dex file...");
apkFile.getDirectory().copyToDir(outDir, "classes.dex");
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}
示例7: decodeManifestRaw
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeManifestRaw(ExtFile apkFile, File outDir)
throws AndrolibException {
try {
Directory apk = apkFile.getDirectory();
LOGGER.info("Copying raw manifest...");
apkFile.getDirectory().copyToDir(outDir, APK_MANIFEST_FILENAMES);
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}
示例8: decodeRawFiles
import brut.androlib.res.util.ExtFile; //导入方法依赖的package包/类
public void decodeRawFiles(ExtFile apkFile, File outDir)
throws AndrolibException {
LOGGER.info("Copying assets and libs...");
try {
Directory in = apkFile.getDirectory();
if (in.containsDir("assets")) {
in.copyToDir(outDir, "assets");
}
if (in.containsDir("lib")) {
in.copyToDir(outDir, "lib");
}
} catch (DirectoryException ex) {
throw new AndrolibException(ex);
}
}