Home | History | Annotate | Download | only in dex

Lines Matching refs:magic

78     /** common prefix for all dex file "magic numbers" */
81 /** common suffix for all dex file "magic numbers" */
103 * Returns the API level corresponding to the given magic number,
105 * magic number.
107 * @param magic array of bytes containing DEX file magic string
108 * @return API level corresponding to magic string if valid, -1 otherwise.
110 public static int magicToApi(byte[] magic) {
111 if (magic.length != 8) {
115 if ((magic[0] != 'd') || (magic[1] != 'e') || (magic[2] != 'x') || (magic[3] != '\n') ||
116 (magic[7] != '\0')) {
120 String version = "" + ((char) magic[4]) + ((char) magic[5]) +((char) magic[6]);
138 * Returns the magic number corresponding to the given target API level.
141 * @return Magic string corresponding to API level supplied.
162 * Checks whether a DEX file magic string is supported.
163 * @param magic string from DEX file
166 public static boolean isSupportedDexMagic(byte[] magic) {
167 int api = magicToApi(magic);