(String path)
| 48 | } |
| 49 | |
| 50 | public static String readResource(String path) { |
| 51 | URL url = _nativeLibraryClass.getResource(path); |
| 52 | if (url == null) |
| 53 | return null; |
| 54 | try (InputStream is = url.openStream()) { |
| 55 | byte[] bytes = is.readAllBytes(); |
| 56 | return new String(bytes).trim(); |
| 57 | } catch (IOException e) { |
| 58 | return null; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | public static synchronized void load() { |
| 63 | if (_loaded) return; |