|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdalvik.system.DexFile
public final class DexFile
Manipulate DEX files. Similar in principle to java.util.zip.ZipFile. Used primarily by class loaders. We don't directly open and read the DEX file here. They're mapped read-only by the VM.
| Constructor Summary | |
|---|---|
DexFile(File file)
Open a DEX file from a File object. |
|
DexFile(String fileName)
Open a DEX file from a filename (preferrably a full path). |
|
| Method Summary | |
|---|---|
void |
close()
Close a DEX file. |
Enumeration<String> |
entries()
Enumerate the names of the classes in this DEX file. |
protected void |
finalize()
GC helper. |
String |
getName()
Get the name of the open file. |
static boolean |
isDexOptNeeded(String fileName)
Returns true if the VM believes that the apk/jar file is out of date and should be passed through "dexopt" again. |
Class |
loadClass(String name,
ClassLoader loader)
Load a class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DexFile(File file)
throws IOException
IOException
public DexFile(String fileName)
throws IOException
IOException| Method Detail |
|---|
public String getName()
public void close()
throws IOException
IOException
public Class loadClass(String name,
ClassLoader loader)
public Enumeration<String> entries()
protected void finalize()
throws IOException
finalize in class ObjectIOException
public static boolean isDexOptNeeded(String fileName)
throws FileNotFoundException,
IOException
fileName - the absolute path to the apk/jar file to examine.
FileNotFoundException - if fileName is not readable,
not a file, or not present.
IOException - if fileName is not a valid apk/jar file or
if problems occur while parsing it.
NullPointerException - if fileName is null.
StaleDexCacheError - if the optimized dex file
is stale but exists on a read-only partition.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||