Class H3CoreLoader

java.lang.Object
com.uber.h3core.H3CoreLoader

public final class H3CoreLoader
extends Object
Extracts the native H3 core library to the local filesystem and loads it.
  • Method Details

    • loadNatives

      public static com.uber.h3core.NativeMethods loadNatives() throws IOException
      For use when the H3 library should be unpacked from the JAR and loaded.
      Throws:
      SecurityException - Loading the library was not allowed by the SecurityManager.
      UnsatisfiedLinkError - The library could not be loaded
      IOException - Failed to unpack the library
    • loadNatives

      public static com.uber.h3core.NativeMethods loadNatives​(H3CoreLoader.OperatingSystem os, String arch) throws IOException
      For use when the H3 library should be unpacked from the JAR and loaded. The native library for the specified operating system and architecture will be extract.

      H3 will only successfully extract the library once, even if different operating system and architecture are specified, or if loadNatives() was used instead.

      Parameters:
      os - Operating system whose lobrary should be used
      arch - Architecture name, as packaged in the H3 library
      Throws:
      SecurityException - Loading the library was not allowed by the SecurityManager.
      UnsatisfiedLinkError - The library could not be loaded
      IOException - Failed to unpack the library
    • loadSystemNatives

      public static com.uber.h3core.NativeMethods loadSystemNatives()
      For use when the H3 library is installed system-wide and Java is able to locate it.
      Throws:
      SecurityException - Loading the library was not allowed by the SecurityManager.
      UnsatisfiedLinkError - The library could not be loaded