{\r
File libFile = new File(libraryFolder, libraryFileName);\r
\r
- if (libFile.exists())\r
- return true;\r
try\r
{\r
- // extract file into the current directory\r
- InputStream reader = SQLiteJDBCLoader.class.getResourceAsStream(libraryResourcePath);\r
- FileOutputStream writer = new FileOutputStream(libFile);\r
- byte[] buffer = new byte[1024];\r
- int bytesRead = 0;\r
- while ((bytesRead = reader.read(buffer)) != -1)\r
+ if (!libFile.exists())\r
{\r
- writer.write(buffer, 0, bytesRead);\r
- }\r
+ // extract file into the current directory\r
+ InputStream reader = SQLiteJDBCLoader.class.getResourceAsStream(libraryResourcePath);\r
+ FileOutputStream writer = new FileOutputStream(libFile);\r
+ byte[] buffer = new byte[1024];\r
+ int bytesRead = 0;\r
+ while ((bytesRead = reader.read(buffer)) != -1)\r
+ {\r
+ writer.write(buffer, 0, bytesRead);\r
+ }\r
\r
- writer.close();\r
- reader.close();\r
+ writer.close();\r
+ reader.close();\r
\r
- if (!System.getProperty("os.name").contains("Windows"))\r
- {\r
- try\r
+ if (!System.getProperty("os.name").contains("Windows"))\r
{\r
- Runtime.getRuntime().exec(new String[] { "chmod", "755", libFile.getAbsolutePath() }).waitFor();\r
+ try\r
+ {\r
+ Runtime.getRuntime().exec(new String[] { "chmod", "755", libFile.getAbsolutePath() }).waitFor();\r
+ }\r
+ catch (Throwable e)\r
+ {}\r
}\r
- catch (Throwable e)\r
- {}\r
}\r
\r
return setNativeLibraryPath(libraryFolder, libraryFileName);\r