本文整理汇总了Java中pxb.android.axml.AxmlReader类的典型用法代码示例。如果您正苦于以下问题:Java AxmlReader类的具体用法?Java AxmlReader怎么用?Java AxmlReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AxmlReader类属于pxb.android.axml包,在下文中一共展示了AxmlReader类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: commit
import pxb.android.axml.AxmlReader; //导入依赖的package包/类
public ManifestEditor commit() throws IOException {
AxmlWriter writer = new MutableAxmlWriter();
AxmlReader reader = new AxmlReader(IOUtils.readFully(mManifestInputStream, mManifestInputStream.available()));
reader.accept(writer);
mManifestData = writer.toByteArray();
return this;
}
开发者ID:hyb1996,项目名称:Auto.js-ApkBuilder,代码行数:8,代码来源:ManifestEditor.java
示例2: modifyManifest
import pxb.android.axml.AxmlReader; //导入依赖的package包/类
private static void modifyManifest(final String[] args) {
try {
String androidManifestBinXml = args[0];
needRemoveConflict = args[1].contains("!");
needRemoveLib = args[1].contains("%");
newPackageFullName = args[1].replace("!", "").replace("%", "");
InputStream is = new FileInputStream(androidManifestBinXml);
byte[] xml = new byte[is.available()];
is.read(xml);
is.close();
AxmlReader ar = new AxmlReader(xml);
AxmlWriter aw = new AxmlWriter();
ar.accept(new AxmlVisitor(aw) {
@Override
public NodeVisitor child(String ns, String name) {
return new MyNodeVisitor(super.child(ns, name), name);
}
});
if (changed) {
byte[] modified = aw.toByteArray();
FileOutputStream fos = new FileOutputStream(androidManifestBinXml);
fos.write(modified);
fos.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
开发者ID:BuildmLearn,项目名称:BuildmLearn-Toolkit-Android,代码行数:31,代码来源:SignerThread.java
示例3: test
import pxb.android.axml.AxmlReader; //导入依赖的package包/类
@Test
public void test() throws Exception {
for (File file : new File("src/test/resources/").listFiles()) {
if (file.getName().endsWith(".axml")) {
System.out.println("======= test " + file);
byte[] xml = Util.readFile(file);
AxmlReader rd = new AxmlReader(xml);
AxmlWriter wr = new AxmlWriter();
System.out.println("=== A ");
rd.accept((new DumpAdapter(wr)));
System.out.println("=== B ");
new AxmlReader(wr.toByteArray()).accept(new DumpAdapter(AxmlReader.EMPTY_VISITOR));
}
}
}
开发者ID:johanns,项目名称:axml,代码行数:16,代码来源:Test2.java
示例4: test
import pxb.android.axml.AxmlReader; //导入依赖的package包/类
@Test
public void test() throws IOException {
AxmlWriter aw = new AxmlWriter();
NodeVisitor nv = aw.child("http://abc.com", "abc");
nv.end();
nv = aw.child("http://efg.com", "efg");
nv.end();
aw.end();
AxmlReader ar = new AxmlReader(aw.toByteArray());
ar.accept(new DumpAdapter());
}
开发者ID:johanns,项目名称:axml,代码行数:12,代码来源:Test4.java
示例5: test2
import pxb.android.axml.AxmlReader; //导入依赖的package包/类
@Test
public void test2() throws IOException {
AxmlWriter aw = new AxmlWriter();
aw.ns("efg", "http://abc.com", -1);
NodeVisitor nv = aw.child("http://abc.com", "abc");
nv.end();
nv = aw.child("http://efg.com", "efg");
nv.end();
aw.end();
AxmlReader ar = new AxmlReader(aw.toByteArray());
ar.accept(new DumpAdapter());
}
开发者ID:johanns,项目名称:axml,代码行数:13,代码来源:Test4.java
示例6: test
import pxb.android.axml.AxmlReader; //导入依赖的package包/类
@Test
public void test() throws Exception {
AxmlReader reader = new AxmlReader(Util.readFile(new File("AndroidManifest1.xml")));
reader.accept(new DumpAdapter());
}
开发者ID:hyb1996,项目名称:Auto.js-ApkBuilder,代码行数:6,代码来源:ExampleUnitTest.java
示例7: parseFile
import pxb.android.axml.AxmlReader; //导入依赖的package包/类
@Override
public void parseFile(byte[] buffer) throws IOException {
AxmlReader rdr = new AxmlReader(buffer);
rdr.accept(new MyNodeVisitor());
}
开发者ID:flankerhqd,项目名称:JAADAS,代码行数:6,代码来源:AXML20Parser.java
注:本文中的pxb.android.axml.AxmlReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论