public static synchronized File extractTessResources ( String resourceName ) { File targetPath = null ; try { targetPath = new File ( TESS4J_TEMP_DIR , resourceName ) ; Enumeration < URL > resources = LoadLibs . class . getClassLoader ( ) . getResources ( resourceName ) ; while ( resources . hasMoreElements ( ) ) { URL resourceUrl = resources . nextElement ( ) ; copyResources ( resourceUrl , targetPath ) ; } } catch ( IOException | URISyntaxException e ) { logger . warn ( e . getMessage ( ) , e ) ; } return targetPath ; }
Extracts tesseract resources to temp folder .