org.jf.dexlib2.dexbacked.util.VariableSizeList Java Examples
The following examples show how to use
org.jf.dexlib2.dexbacked.util.VariableSizeList.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DexBackedArrayEncodedValue.java From ZjDroid with Apache License 2.0 | 5 votes |
@Nonnull @Override public List<? extends EncodedValue> getValue() { return new VariableSizeList<EncodedValue>(dexFile, encodedArrayOffset, elementCount) { @Nonnull @Override protected EncodedValue readNextItem(@Nonnull DexReader dexReader, int index) { return DexBackedEncodedValue.readFrom(dexReader); } }; }
Example #2
Source File: DexBackedArrayEncodedValue.java From zjdroid with Apache License 2.0 | 5 votes |
@Nonnull @Override public List<? extends EncodedValue> getValue() { return new VariableSizeList<EncodedValue>(dexFile, encodedArrayOffset, elementCount) { @Nonnull @Override protected EncodedValue readNextItem(@Nonnull DexReader dexReader, int index) { return DexBackedEncodedValue.readFrom(dexReader); } }; }
Example #3
Source File: DexBackedArrayEncodedValue.java From HeyGirl with Apache License 2.0 | 5 votes |
@Nonnull @Override public List<? extends EncodedValue> getValue() { return new VariableSizeList<EncodedValue>(dexFile, encodedArrayOffset, elementCount) { @Nonnull @Override protected EncodedValue readNextItem(@Nonnull DexReader dexReader, int index) { return DexBackedEncodedValue.readFrom(dexReader); } }; }
Example #4
Source File: DexBackedArrayEncodedValue.java From ZjDroid with Apache License 2.0 | 5 votes |
@Nonnull @Override public List<? extends EncodedValue> getValue() { return new VariableSizeList<EncodedValue>(dexFile, encodedArrayOffset, elementCount) { @Nonnull @Override protected EncodedValue readNextItem(@Nonnull DexReader dexReader, int index) { return DexBackedEncodedValue.readFrom(dexReader); } }; }
Example #5
Source File: DexBackedOdexFile.java From ZjDroid with Apache License 2.0 | 4 votes |
public List<String> getDependencies() { if (this.getReader() == null) { final int dexOffset = OdexHeaderItem.getDexOffset(odexBuf); final int dependencyOffset = OdexHeaderItem .getDependenciesOffset(odexBuf) - dexOffset; BaseDexBuffer buf = new BaseDexBuffer(this.buf); int dependencyCount = buf.readInt(dependencyOffset + DEPENDENCY_COUNT_OFFSET); return new VariableSizeList<String>(this, dependencyOffset + DEPENDENCY_START_OFFSET, dependencyCount) { @Override protected String readNextItem(@Nonnull DexReader reader, int index) { int length = reader.readInt(); int offset = reader.getOffset(); reader.moveRelative(length + 20); try { return new String(DexBackedOdexFile.this.buf, offset, length - 1, "US-ASCII"); } catch (UnsupportedEncodingException ex) { throw new RuntimeException(ex); } } }; } else { File file = new File("/system/framework/"); File[] filelist = file.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { // TODO Auto-generated method stub if(pathname.getAbsolutePath().endsWith(".jar")) return true; else return false; } }); List<String> list = new ArrayList<String>(filelist.length); for(int i = 0; i<filelist.length; i++){ list.add(filelist[i].getAbsolutePath()); } return list; } }
Example #6
Source File: DexBackedOdexFile.java From zjdroid with Apache License 2.0 | 4 votes |
public List<String> getDependencies() { if (this.getReader() == null) { final int dexOffset = OdexHeaderItem.getDexOffset(odexBuf); final int dependencyOffset = OdexHeaderItem .getDependenciesOffset(odexBuf) - dexOffset; BaseDexBuffer buf = new BaseDexBuffer(this.buf); int dependencyCount = buf.readInt(dependencyOffset + DEPENDENCY_COUNT_OFFSET); return new VariableSizeList<String>(this, dependencyOffset + DEPENDENCY_START_OFFSET, dependencyCount) { @Override protected String readNextItem(@Nonnull DexReader reader, int index) { int length = reader.readInt(); int offset = reader.getOffset(); reader.moveRelative(length + 20); try { return new String(DexBackedOdexFile.this.buf, offset, length - 1, "US-ASCII"); } catch (UnsupportedEncodingException ex) { throw new RuntimeException(ex); } } }; } else { File file = new File("/system/framework/"); File[] filelist = file.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { // TODO Auto-generated method stub if(pathname.getAbsolutePath().endsWith(".jar")) return true; else return false; } }); List<String> list = new ArrayList<String>(filelist.length); for(int i = 0; i<filelist.length; i++){ list.add(filelist[i].getAbsolutePath()); } return list; } }
Example #7
Source File: DexBackedOdexFile.java From HeyGirl with Apache License 2.0 | 4 votes |
public List<String> getDependencies() { if (this.getReader() == null) { final int dexOffset = OdexHeaderItem.getDexOffset(odexBuf); final int dependencyOffset = OdexHeaderItem .getDependenciesOffset(odexBuf) - dexOffset; BaseDexBuffer buf = new BaseDexBuffer(this.buf); int dependencyCount = buf.readInt(dependencyOffset + DEPENDENCY_COUNT_OFFSET); return new VariableSizeList<String>(this, dependencyOffset + DEPENDENCY_START_OFFSET, dependencyCount) { @Override protected String readNextItem(@Nonnull DexReader reader, int index) { int length = reader.readInt(); int offset = reader.getOffset(); reader.moveRelative(length + 20); try { return new String(DexBackedOdexFile.this.buf, offset, length - 1, "US-ASCII"); } catch (UnsupportedEncodingException ex) { throw new RuntimeException(ex); } } }; } else { File file = new File("/system/framework/"); File[] filelist = file.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { // TODO Auto-generated method stub if(pathname.getAbsolutePath().endsWith(".jar")) return true; else return false; } }); List<String> list = new ArrayList<String>(filelist.length); for(int i = 0; i<filelist.length; i++){ list.add(filelist[i].getAbsolutePath()); } return list; } }
Example #8
Source File: DexBackedOdexFile.java From ZjDroid with Apache License 2.0 | 4 votes |
public List<String> getDependencies() { if (this.getReader() == null) { final int dexOffset = OdexHeaderItem.getDexOffset(odexBuf); final int dependencyOffset = OdexHeaderItem .getDependenciesOffset(odexBuf) - dexOffset; BaseDexBuffer buf = new BaseDexBuffer(this.buf); int dependencyCount = buf.readInt(dependencyOffset + DEPENDENCY_COUNT_OFFSET); return new VariableSizeList<String>(this, dependencyOffset + DEPENDENCY_START_OFFSET, dependencyCount) { @Override protected String readNextItem(@Nonnull DexReader reader, int index) { int length = reader.readInt(); int offset = reader.getOffset(); reader.moveRelative(length + 20); try { return new String(DexBackedOdexFile.this.buf, offset, length - 1, "US-ASCII"); } catch (UnsupportedEncodingException ex) { throw new RuntimeException(ex); } } }; } else { File file = new File("/system/framework/"); File[] filelist = file.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { // TODO Auto-generated method stub if(pathname.getAbsolutePath().endsWith(".jar")) return true; else return false; } }); List<String> list = new ArrayList<String>(filelist.length); for(int i = 0; i<filelist.length; i++){ list.add(filelist[i].getAbsolutePath()); } return list; } }