Package net.sourceforge.tess4j.util
Class LoadLibs
- java.lang.Object
-
- net.sourceforge.tess4j.util.LoadLibs
-
public class LoadLibs extends java.lang.Object
Loads native libraries from JAR or project folder.- Author:
- O.J. Sousa Rodrigues, Quan Nguyen, itsura
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LIB_NAME
Native library name.static java.lang.String
LIB_NAME_NON_WIN
static java.lang.String
TESS4J_TEMP_DIR
-
Constructor Summary
Constructors Constructor Description LoadLibs()
-
Method Summary
Modifier and Type Method Description static java.io.File
extractTessResources(java.lang.String resourceName)
Extracts tesseract resources to temp folder.static TessAPI
getTessAPIInstance()
Loads Tesseract library via JNA.static java.lang.String
getTesseractLibName()
Gets native library name.
-
-
-
Field Detail
-
TESS4J_TEMP_DIR
public static final java.lang.String TESS4J_TEMP_DIR
-
LIB_NAME
public static final java.lang.String LIB_NAME
Native library name.- See Also:
- Constant Field Values
-
LIB_NAME_NON_WIN
public static final java.lang.String LIB_NAME_NON_WIN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTessAPIInstance
public static TessAPI getTessAPIInstance()
Loads Tesseract library via JNA.- Returns:
- TessAPI instance being loaded using
Native.loadLibrary()
.
-
getTesseractLibName
public static java.lang.String getTesseractLibName()
Gets native library name.- Returns:
- the name of the tesseract library to be loaded using the
Native.register()
.
-
extractTessResources
public static java.io.File extractTessResources(java.lang.String resourceName)
Extracts tesseract resources to temp folder.- Parameters:
resourceName
- name of file or directory- Returns:
- target path, which could be file or directory
-
-