Package org.jf.dexlib2.dexbacked.raw
Class OdexHeaderItem
- java.lang.Object
-
- org.jf.dexlib2.dexbacked.raw.OdexHeaderItem
-
public class OdexHeaderItem extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intAUX_LENGTH_OFFSETstatic intAUX_OFFSETstatic intDEPENDENCIES_LENGTH_OFFSETstatic intDEPENDENCIES_OFFSETstatic intDEX_LENGTH_OFFSETstatic intDEX_OFFSETstatic intFLAGS_OFFSETstatic intITEM_SIZEstatic intMAGIC_LENGTHstatic intMAGIC_OFFSET
-
Constructor Summary
Constructors Constructor Description OdexHeaderItem()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetDependenciesOffset(byte[] buf)static intgetDexOffset(byte[] buf)static intgetVersion(byte[] buf, int offset)Gets the dex version from an odex headerstatic booleanisSupportedOdexVersion(int version)static booleanverifyMagic(byte[] buf, int offset)Verifies the magic value at the beginning of an odex file
-
-
-
Field Detail
-
ITEM_SIZE
public static final int ITEM_SIZE
- See Also:
- Constant Field Values
-
MAGIC_OFFSET
public static final int MAGIC_OFFSET
- See Also:
- Constant Field Values
-
MAGIC_LENGTH
public static final int MAGIC_LENGTH
- See Also:
- Constant Field Values
-
DEX_OFFSET
public static final int DEX_OFFSET
- See Also:
- Constant Field Values
-
DEX_LENGTH_OFFSET
public static final int DEX_LENGTH_OFFSET
- See Also:
- Constant Field Values
-
DEPENDENCIES_OFFSET
public static final int DEPENDENCIES_OFFSET
- See Also:
- Constant Field Values
-
DEPENDENCIES_LENGTH_OFFSET
public static final int DEPENDENCIES_LENGTH_OFFSET
- See Also:
- Constant Field Values
-
AUX_OFFSET
public static final int AUX_OFFSET
- See Also:
- Constant Field Values
-
AUX_LENGTH_OFFSET
public static final int AUX_LENGTH_OFFSET
- See Also:
- Constant Field Values
-
FLAGS_OFFSET
public static final int FLAGS_OFFSET
- See Also:
- Constant Field Values
-
-
Method Detail
-
verifyMagic
public static boolean verifyMagic(byte[] buf, int offset)Verifies the magic value at the beginning of an odex file- Parameters:
buf- A byte array containing at least the first 8 bytes of an odex fileoffset- The offset within the buffer to the beginning of the odex header- Returns:
- True if the magic value is valid
-
getVersion
public static int getVersion(byte[] buf, int offset)Gets the dex version from an odex header- Parameters:
buf- A byte array containing at least the first 7 bytes of an odex fileoffset- The offset within the buffer to the beginning of the odex header- Returns:
- The odex version if the header is valid or -1 if the header is invalid
-
isSupportedOdexVersion
public static boolean isSupportedOdexVersion(int version)
-
getDexOffset
public static int getDexOffset(byte[] buf)
-
getDependenciesOffset
public static int getDependenciesOffset(byte[] buf)
-
-