Class NativeLibraryLoader

java.lang.Object
io.objectbox.internal.NativeLibraryLoader

public class NativeLibraryLoader extends Object
Separate class, so we can mock BoxStore.
  • Field Details

  • Constructor Details

    • NativeLibraryLoader

      public NativeLibraryLoader()
  • Method Details

    • getCpuArch

      private static String getCpuArch()
      Get CPU architecture of the JVM (Note: this can not be used for Android, Android decides arch on its own and looks for library in appropriately named folder).

      Note that this may not be the architecture of the actual hardware (e.g. when running a x86 JVM on an amd64 machine).

    • getCpuArchOSOrNull

      @Nullable private static String getCpuArchOSOrNull()
      Get architecture using operating system tools. Currently only Linux is supported (using uname).
    • checkUnpackLib

      private static void checkUnpackLib(String filename)
    • loadLibraryAndroid

      private static boolean loadLibraryAndroid()
    • getSupportedABIsAndroid

      @Nonnull private static String getSupportedABIsAndroid()
      Return a string containing a list of ABIs that are supported by the current Android device. If the Android device is below API level 21 (Android 5) or if looking up the value fails, returns an empty string.
    • ensureLoaded

      public static void ensureLoaded()