com.android.dx.dex
Class DexFormat

java.lang.Object
  extended by com.android.dx.dex.DexFormat

public final class DexFormat
extends Object

Constants that show up in and are otherwise related to .dex files, and helper methods for same.


Field Summary
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 String VERSION_CURRENT
          dex file version number for the current format variant
static String VERSION_FOR_API_13
          dex file version number for API level 13 and earlier
 
Method Summary
static String apiToMagic(int targetApiLevel)
          Returns the magic number corresponding to the given target API level.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 .dex file inside an application or library .jar file

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
Method Detail

magicToApi

public 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.


apiToMagic

public static String apiToMagic(int targetApiLevel)
Returns the magic number corresponding to the given target API level.



Copyright © 2013. All Rights Reserved.