public abstract class BaseJniExtractor extends Object implements JniExtractor
Modifier and Type | Field and Description |
---|---|
protected static String |
ALTR_TMPDIR |
protected static String |
JAVA_TMPDIR |
protected static String |
TMP_PREFIX |
Constructor and Description |
---|
BaseJniExtractor() |
BaseJniExtractor(Class<?> libraryJarClass) |
Modifier and Type | Method and Description |
---|---|
File |
extractJni(String libPath,
String libname)
Extract a JNI library from the classpath to a temporary file.
|
void |
extractRegistered()
Extract all libraries which are registered for auto-extraction to files in
the temporary directory.
|
abstract File |
getJniDir()
this is where JNI libraries are extracted to (e.g.
|
abstract File |
getNativeDir()
this is where native dependencies are extracted to (e.g.
|
protected static File |
getTempDir() |
protected static final String JAVA_TMPDIR
protected static final String ALTR_TMPDIR
protected static final String TMP_PREFIX
public BaseJniExtractor() throws IOException
IOException
public BaseJniExtractor(Class<?> libraryJarClass) throws IOException
IOException
protected static File getTempDir() throws IOException
IOException
public abstract File getNativeDir()
public abstract File getJniDir()
public File extractJni(String libPath, String libname) throws IOException
JniExtractor
extractJni
in interface JniExtractor
libPath
- library pathlibname
- System.loadLibrary() compatible library nameIOException
- when extracting the desired file failedpublic void extractRegistered() throws IOException
JniExtractor
extractRegistered
in interface JniExtractor
IOException
- when extracting the desired file failedCopyright © 2015–2022 SciJava. All rights reserved.