Package net.sourceforge.lept4j.util
Class LoadLibs
java.lang.Object
net.sourceforge.lept4j.util.LoadLibs
public class LoadLibs
extends java.lang.Object
Loads native libraries from JAR or project folder.
- Author:
- O.J. Sousa Rodrigues, Quan Nguyen
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringLEPT4J_TEMP_DIRstatic java.lang.StringLIB_NAMENative library name.static java.lang.StringLIB_NAME_NON_WIN
- 
Constructor SummaryConstructors Constructor Description LoadLibs()
- 
Method SummaryModifier and Type Method Description static java.io.FileextractNativeResources(java.lang.String dirname)Extracts Leptonica resources to temp folder.static LeptonicagetLeptonicaInstance()Loads Leptonica library via JNA.static java.lang.StringgetLeptonicaLibName()Gets native library name.
- 
Field Details- 
LEPT4J_TEMP_DIRpublic static final java.lang.String LEPT4J_TEMP_DIR
- 
LIB_NAMEpublic static final java.lang.String LIB_NAMENative library name.- See Also:
- Constant Field Values
 
- 
LIB_NAME_NON_WINpublic static final java.lang.String LIB_NAME_NON_WIN- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
LoadLibspublic LoadLibs()
 
- 
- 
Method Details- 
getLeptonicaInstanceLoads Leptonica library via JNA.- Returns:
- Leptonica instance being loaded using
 Native.loadLibrary().
 
- 
getLeptonicaLibNamepublic static java.lang.String getLeptonicaLibName()Gets native library name.- Returns:
- the name of the Leptonica library to be loaded using the
 Native.register().
 
- 
extractNativeResourcespublic static java.io.File extractNativeResources(java.lang.String dirname)Extracts Leptonica resources to temp folder.- Parameters:
- dirname- resource location
- Returns:
- target location
 
 
-