public class HeaderItem
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BIG_ENDIAN_TAG |
static int |
CHECKSUM_DATA_START_OFFSET |
static int |
CHECKSUM_OFFSET |
static int |
CLASS_COUNT_OFFSET |
static int |
CLASS_START_OFFSET |
static int |
DATA_SIZE_OFFSET |
static int |
DATA_START_OFFSET |
static int |
ENDIAN_TAG_OFFSET |
static int |
FIELD_COUNT_OFFSET |
static int |
FIELD_START_OFFSET |
static int |
FILE_SIZE_OFFSET |
static int |
HEADER_SIZE_OFFSET |
static int |
ITEM_SIZE |
static int |
LITTLE_ENDIAN_TAG |
static int |
MAP_OFFSET |
static int |
METHOD_COUNT_OFFSET |
static int |
METHOD_START_OFFSET |
static int |
PROTO_COUNT_OFFSET |
static int |
PROTO_START_OFFSET |
static int |
SIGNATURE_DATA_START_OFFSET |
static int |
SIGNATURE_OFFSET |
static int |
SIGNATURE_SIZE |
static int |
STRING_COUNT_OFFSET |
static int |
STRING_START_OFFSET |
static int |
TYPE_COUNT_OFFSET |
static int |
TYPE_START_OFFSET |
| Constructor and Description |
|---|
HeaderItem(DexBackedDexFile dexFile) |
| Modifier and Type | Method and Description |
|---|---|
int |
getChecksum() |
int |
getClassCount() |
int |
getClassOffset() |
static int |
getEndian(byte[] buf,
int offset) |
int |
getFieldCount() |
int |
getFieldOffset() |
int |
getHeaderSize() |
static byte[] |
getMagicForApi(int api)
Get the highest magic number supported by Android for this api level.
|
static byte[] |
getMagicForDexVersion(int dexVersion) |
int |
getMapOffset() |
int |
getMethodCount() |
int |
getMethodOffset() |
int |
getProtoCount() |
int |
getProtoOffset() |
byte[] |
getSignature() |
int |
getStringCount() |
int |
getStringOffset() |
int |
getTypeCount() |
int |
getTypeOffset() |
static int |
getVersion(byte[] buf,
int offset)
Gets the dex version from a dex header
|
static boolean |
isSupportedDexVersion(int version) |
static SectionAnnotator |
makeAnnotator(DexAnnotator annotator,
MapItem mapItem) |
static boolean |
verifyMagic(byte[] buf,
int offset)
Verifies the magic value at the beginning of a dex file
|
public static final int ITEM_SIZE
public static final int LITTLE_ENDIAN_TAG
public static final int BIG_ENDIAN_TAG
public static final int CHECKSUM_OFFSET
public static final int CHECKSUM_DATA_START_OFFSET
public static final int SIGNATURE_OFFSET
public static final int SIGNATURE_SIZE
public static final int SIGNATURE_DATA_START_OFFSET
public static final int FILE_SIZE_OFFSET
public static final int HEADER_SIZE_OFFSET
public static final int ENDIAN_TAG_OFFSET
public static final int MAP_OFFSET
public static final int STRING_COUNT_OFFSET
public static final int STRING_START_OFFSET
public static final int TYPE_COUNT_OFFSET
public static final int TYPE_START_OFFSET
public static final int PROTO_COUNT_OFFSET
public static final int PROTO_START_OFFSET
public static final int FIELD_COUNT_OFFSET
public static final int FIELD_START_OFFSET
public static final int METHOD_COUNT_OFFSET
public static final int METHOD_START_OFFSET
public static final int CLASS_COUNT_OFFSET
public static final int CLASS_START_OFFSET
public static final int DATA_SIZE_OFFSET
public static final int DATA_START_OFFSET
public HeaderItem(@Nonnull
DexBackedDexFile dexFile)
public int getChecksum()
@Nonnull public byte[] getSignature()
public int getMapOffset()
public int getHeaderSize()
public int getStringCount()
public int getStringOffset()
public int getTypeCount()
public int getTypeOffset()
public int getProtoCount()
public int getProtoOffset()
public int getFieldCount()
public int getFieldOffset()
public int getMethodCount()
public int getMethodOffset()
public int getClassCount()
public int getClassOffset()
@Nonnull public static SectionAnnotator makeAnnotator(@Nonnull DexAnnotator annotator, @Nonnull MapItem mapItem)
public static byte[] getMagicForApi(int api)
public static byte[] getMagicForDexVersion(int dexVersion)
public static boolean verifyMagic(byte[] buf,
int offset)
buf - A byte array containing at least the first 8 bytes of a dex fileoffset - The offset within the buffer to the beginning of the dex headerpublic static int getVersion(byte[] buf,
int offset)
buf - A byte array containing at least the first 7 bytes of a dex fileoffset - The offset within the buffer to the beginning of the dex headerpublic static boolean isSupportedDexVersion(int version)
public static int getEndian(byte[] buf,
int offset)