|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.android.dx.io.DexBuffer
public final class DexBuffer
The bytes of a dex file in memory for reading and writing. All int offsets are unsigned.
| Nested Class Summary | |
|---|---|
class |
DexBuffer.Section
|
| Constructor Summary | |
|---|---|
DexBuffer()
Creates a new dex buffer defining no classes. |
|
DexBuffer(byte[] data)
Creates a new dex buffer that reads from data. |
|
DexBuffer(File file)
Creates a new dex buffer from the dex file file. |
|
DexBuffer(InputStream in)
Creates a new dex buffer of the dex in in, and closes in. |
|
| Method Summary | |
|---|---|
DexBuffer.Section |
appendSection(int maxByteCount,
String name)
|
Iterable<ClassDef> |
classDefs()
|
List<FieldId> |
fieldIds()
|
byte[] |
getBytes()
|
int |
getLength()
|
TableOfContents |
getTableOfContents()
|
List<MethodId> |
methodIds()
|
void |
noMoreSections()
|
DexBuffer.Section |
open(int position)
|
List<ProtoId> |
protoIds()
|
ClassData |
readClassData(ClassDef classDef)
|
Code |
readCode(ClassData.Method method)
|
TypeList |
readTypeList(int offset)
|
List<String> |
strings()
|
List<Integer> |
typeIds()
|
List<String> |
typeNames()
|
void |
writeTo(File dexOut)
|
void |
writeTo(OutputStream out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DexBuffer()
public DexBuffer(byte[] data)
throws IOException
data. It is an error to
modify data after using it to create a dex buffer.
IOException
public DexBuffer(InputStream in)
throws IOException
in, and closes in.
IOException
public DexBuffer(File file)
throws IOException
file.
IOException| Method Detail |
|---|
public void writeTo(OutputStream out)
throws IOException
IOException
public void writeTo(File dexOut)
throws IOException
IOExceptionpublic TableOfContents getTableOfContents()
public DexBuffer.Section open(int position)
public DexBuffer.Section appendSection(int maxByteCount,
String name)
public void noMoreSections()
public int getLength()
public byte[] getBytes()
public List<String> strings()
public List<Integer> typeIds()
public List<String> typeNames()
public List<ProtoId> protoIds()
public List<FieldId> fieldIds()
public List<MethodId> methodIds()
public Iterable<ClassDef> classDefs()
public TypeList readTypeList(int offset)
public ClassData readClassData(ClassDef classDef)
public Code readCode(ClassData.Method method)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||