Package io.github.neonorbit.dexplore
Class DexFactory
- java.lang.Object
-
- io.github.neonorbit.dexplore.DexFactory
-
public final class DexFactory extends java.lang.ObjectA factory class for loading dex files.Supported types: apk, zip, dex, odex, oat
Available methods: Note: TheDexploreinstances created by this class are thread-safe.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description DexFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Dexploreload(byte[] buffer)Loads a dex or odex file from memory.static Dexploreload(byte[] buffer, DexOptions options)Loads a dex or odex file from memory.static Dexploreload(java.lang.String path)Loads a file containing one or more dex files.static Dexploreload(java.lang.String path, DexOptions options)Loads a file containing one or more dex files.
-
-
-
Method Detail
-
load
@Nonnull public static Dexplore load(@Nonnull java.lang.String path)
Loads a file containing one or more dex files.Note: The returned instance is thread-safe.
See also:load(String, DexOptions)- Parameters:
path- the path of the file to open- Returns:
- A
Dexplorefor the given file - Throws:
DexException- if something goes wrongFileNotFoundException- if the given file does not existUnsupportedFileException- if the given file is not a valid dex file
-
load
@Nonnull public static Dexplore load(@Nonnull java.lang.String path, @Nonnull DexOptions options)
Loads a file containing one or more dex files.Note: The returned instance is thread-safe.
See also:load(String)- Parameters:
path- the path of the file to openoptions- a set of options to apply- Returns:
- A
Dexplorefor the given file - Throws:
DexException- if something goes wrongFileNotFoundException- if the given file does not existUnsupportedFileException- if the given file is not a valid dex file
-
load
@Nonnull public static Dexplore load(@Nonnull byte[] buffer)
Loads a dex or odex file from memory.Note: The returned instance is thread-safe.
See also:load(byte[], DexOptions)- Parameters:
buffer- a byte array containing the dex file- Returns:
- A
Dexploreinstance for the given file - Throws:
UnsupportedFileException- if the given file is not a valid dex file
-
load
@Nonnull public static Dexplore load(@Nonnull byte[] buffer, @Nonnull DexOptions options)
Loads a dex or odex file from memory.Note: The returned instance is thread-safe.
See also:load(byte[])- Parameters:
buffer- a byte array containing the dex fileoptions- a set of dex options to apply- Returns:
- A
Dexploreinstance for the given file - Throws:
UnsupportedFileException- if the given file is not a valid dex file
-
-