3

根据 TrueZIP 文档,TPath该类可以从在线存档文件 ( https://truezip.java.net/truezip-path/index.html ) 中检索条目。

我写了一个简单的程序来尝试模拟它:

String path = "http://www.syntevo.com/smartgit/download?file=smartgit/smartgit-win32-setup-jre-7_1_3.zip/changelog.txt";
TPath tpath = new TPath(new URI(path));
try (InputStream in = Files.newInputStream(tpath)) {
    System.out.println(IOUtils.toString(in));
}

path如果我使用浏览器输入由变量表示的 URL,那将打印我会看到的页面的 html 内容,而不是changelog.txt.

但是,我的目标是远程检索 APK 的 AndroidManifest.xml 文件的内容,而无需下载整个 APK。据我了解并根据他们的文档,TrueZIP 应该能够做到这一点。我错过了什么?

4

0 回答 0