net.sourceforge.jnlp.cache

## Class NativeLibraryStorage

- java.lang.Object
- - net.sourceforge.jnlp.cache.NativeLibraryStorage

-     public class NativeLibraryStorage
      extends java.lang.Object

  Handles loading and access of native code loading through a JNLP application or applet. Stores native code in a temporary folder. Be sure to call cleanupTemporayFolder when finished with the object.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `NATIVE_LIBRARY_EXTENSIONS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NativeLibraryStorage(ResourceTracker tracker)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSearchDirectory(java.io.File directory)` Adds the `File` to the search path of this `NativeLibraryStorage` when trying to find a native library
    `void` | `addSearchJar(java.net.URL jarLocation)` Search for and enable any native code contained in a JAR by copying the native files into the filesystem.
    `void` | `cleanupTemporaryFolder()` Clean up our temporary folder if we created one.
    `java.io.File` | `findLibrary(java.lang.String fileName)` Looks in the search directories for 'fileName', returning a path to the found file if it exists.
    `java.util.List<java.io.File>` | `getSearchDirectories()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NATIVE_LIBRARY_EXTENSIONS

          public static final java.lang.String[] NATIVE_LIBRARY_EXTENSIONS

  - ### Constructor Detail

    - #### NativeLibraryStorage

          public NativeLibraryStorage(ResourceTracker tracker)

  - ### Method Detail

    - #### cleanupTemporaryFolder

          public void cleanupTemporaryFolder()

      Clean up our temporary folder if we created one.

    - #### addSearchDirectory

          public void addSearchDirectory(java.io.File directory)

      Adds the `File` to the search path of this `NativeLibraryStorage` when trying to find a native library
      Parameters:
        `directory` - directory to be added

    - #### getSearchDirectories

          public java.util.List<java.io.File> getSearchDirectories()

    - #### findLibrary

          public java.io.File findLibrary(java.lang.String fileName)

      Looks in the search directories for 'fileName', returning a path to the found file if it exists.
      Parameters:
        `fileName` - name of library to be found
      Returns:
        path to library if found, null otherwise.

    - #### addSearchJar

          public void addSearchJar(java.net.URL jarLocation)

      Search for and enable any native code contained in a JAR by copying the native files into the filesystem. Called in the security context of the classloader.
      Parameters:
        `jarLocation` - location of jar to be searched

Submit a bug or feature