public final class DexFormat extends Object
.dex
files, and helper methods for same.Modifier and Type | Field and Description |
---|---|
static int |
API_CURRENT
API level to target in order to produce the most modern file
format
|
static int |
API_NO_EXTENDED_OPCODES
API level to target in order to suppress extended opcode usage
|
static String |
DEX_IN_JAR_NAME
file name of the primary
.dex file inside an
application or library .jar file |
static int |
ENDIAN_TAG
value used to indicate endianness of file contents
|
static String |
MAGIC_PREFIX
common prefix for all dex file "magic numbers"
|
static String |
MAGIC_SUFFIX
common suffix for all dex file "magic numbers"
|
static int |
MAX_MEMBER_IDX
Maximum addressable field or method index.
|
static int |
MAX_TYPE_IDX
Maximum addressable type index.
|
static String |
VERSION_CURRENT
Dex file version number for dalvik.
|
static String |
VERSION_FOR_API_13
dex file version number for API level 13 and earlier
|
Modifier and Type | Method and Description |
---|---|
static String |
apiToMagic(int targetApiLevel)
Returns the magic number corresponding to the given target API level.
|
static boolean |
isSupportedDexMagic(byte[] magic) |
static int |
magicToApi(byte[] magic)
Returns the API level corresponding to the given magic number,
or
-1 if the given array is not a well-formed dex file
magic number. |
public static final int API_CURRENT
public static final int API_NO_EXTENDED_OPCODES
public static final String DEX_IN_JAR_NAME
.dex
file inside an
application or library .jar
filepublic static final String MAGIC_PREFIX
public static final String MAGIC_SUFFIX
public static final String VERSION_CURRENT
Note: Dex version 36 was loadable in some versions of Dalvik but was never fully supported or completed and is not considered a valid dex file format.
public static final String VERSION_FOR_API_13
public static final int ENDIAN_TAG
public static final int MAX_MEMBER_IDX
public static final int MAX_TYPE_IDX
public static int magicToApi(byte[] magic)
-1
if the given array is not a well-formed dex file
magic number.public static String apiToMagic(int targetApiLevel)
public static boolean isSupportedDexMagic(byte[] magic)
Copyright © 2016. All Rights Reserved.