Class LibraryLocator

java.lang.Object
electrostatic4j.snaploader.filesystem.FileLocator
electrostatic4j.snaploader.library.LibraryLocator
All Implemented Interfaces:
InputStreamProvider, StreamProvider, ZipStreamProvider, AutoCloseable

public class LibraryLocator extends FileLocator
Locates a library inside a jar filesystem, the probable source for the native dynamic libraries to extract and load.
  • Constructor Details

    • LibraryLocator

      public LibraryLocator(String libraryPath)
      Locates the library inside the stock jar filesystem.
      Parameters:
      libraryPath - the path to the dynamic native library inside that jar filesystem
    • LibraryLocator

      public LibraryLocator(ZipFile compression, String filePath) throws IOException
      Locates a library inside an external jar, the external jar is defined by the means of a ZipFile and the native library is defined as a ZipEntry.
      Throws:
      IOException - if the jar to be located is not found or an interrupt I/O operation has occurred.