Package com.android.dex
Class DexFormat
- java.lang.Object
-
- com.android.dex.DexFormat
-
public final class DexFormat extends Object
Constants that show up in and are otherwise related to.dexfiles, and helper methods for same.
-
-
Field Summary
Fields Modifier and Type Field Description static intAPI_CURRENTAPI level to target in order to produce the most modern file formatstatic intAPI_NO_EXTENDED_OPCODESAPI level to target in order to suppress extended opcode usagestatic StringDEX_IN_JAR_NAMEfile name of the primary.dexfile inside an application or library.jarfilestatic intENDIAN_TAGvalue used to indicate endianness of file contentsstatic StringMAGIC_PREFIXcommon prefix for all dex file "magic numbers"static StringMAGIC_SUFFIXcommon suffix for all dex file "magic numbers"static intMAX_MEMBER_IDXMaximum addressable field or method index.static intMAX_TYPE_IDXMaximum addressable type index.static StringVERSION_CURRENTdex file version number for the current format variantstatic StringVERSION_FOR_API_13dex file version number for API level 13 and earlier
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringapiToMagic(int targetApiLevel)Returns the magic number corresponding to the given target API level.static intmagicToApi(byte[] magic)Returns the API level corresponding to the given magic number, or-1if the given array is not a well-formed dex file magic number.
-
-
-
Field Detail
-
API_CURRENT
public static final int API_CURRENT
API level to target in order to produce the most modern file format- See Also:
- Constant Field Values
-
API_NO_EXTENDED_OPCODES
public static final int API_NO_EXTENDED_OPCODES
API level to target in order to suppress extended opcode usage- See Also:
- Constant Field Values
-
DEX_IN_JAR_NAME
public static final String DEX_IN_JAR_NAME
file name of the primary.dexfile inside an application or library.jarfile- See Also:
- Constant Field Values
-
MAGIC_PREFIX
public static final String MAGIC_PREFIX
common prefix for all dex file "magic numbers"- See Also:
- Constant Field Values
-
MAGIC_SUFFIX
public static final String MAGIC_SUFFIX
common suffix for all dex file "magic numbers"- See Also:
- Constant Field Values
-
VERSION_CURRENT
public static final String VERSION_CURRENT
dex file version number for the current format variant- See Also:
- Constant Field Values
-
VERSION_FOR_API_13
public static final String VERSION_FOR_API_13
dex file version number for API level 13 and earlier- See Also:
- Constant Field Values
-
ENDIAN_TAG
public static final int ENDIAN_TAG
value used to indicate endianness of file contents- See Also:
- Constant Field Values
-
MAX_MEMBER_IDX
public static final int MAX_MEMBER_IDX
Maximum addressable field or method index. The largest addressable member is 0xffff, in the "instruction formats" spec as field@CCCC or meth@CCCC.- See Also:
- Constant Field Values
-
MAX_TYPE_IDX
public static final int MAX_TYPE_IDX
Maximum addressable type index. The largest addressable type is 0xffff, in the "instruction formats" spec as type@CCCC.- See Also:
- Constant Field Values
-
-
Method Detail
-
magicToApi
public static int magicToApi(byte[] magic)
Returns the API level corresponding to the given magic number, or-1if the given array is not a well-formed dex file magic number.
-
apiToMagic
public static String apiToMagic(int targetApiLevel)
Returns the magic number corresponding to the given target API level.
-
-