private String getNativesResourcesFilePart() { return getLibName().replace(".dylib", ".jnilib"); }
public void doLoad() { if (loaded) { return; } final long startTime = System.currentTimeMillis(); File tempDir = Files.createTempDir(); tempDir.deleteOnExit(); File extractedLibraryPath = new File(tempDir, getLibName()); try (FileOutputStream outputStream = new FileOutputStream(extractedLibraryPath)) { getLibraryByteSource().copyTo(outputStream); } catch (IOException e) { throw new RuntimeException("Cannot extract SQLite library into " + extractedLibraryPath, e); } loadFromDirectory(tempDir); logWithTime("SQLite natives prepared in", startTime); }
private String getNativesResourcesFilePart() { return getLibName().replace(".dylib", ".jnilib"); }
private String getNativesResourcesFilePart() { return getLibName().replace(".dylib", ".jnilib"); }
private String getNativesResourcesFilePart() { return getLibName().replace(".dylib", ".jnilib"); }
private String getNativesResourcesFilePart() { return getLibName().replace(".dylib", ".jnilib"); }
public File getNativeLibraryPath() { String tempPath = System.getProperty("java.io.tmpdir"); if (tempPath == null) { throw new IllegalStateException("Java temporary directory is not defined (java.io.tmpdir)"); } return new File(Fs.fileFromPath(tempPath).join("robolectric-libs", getLibName()).getPath()); }
public File getNativeLibraryPath() { String tempPath = System.getProperty("java.io.tmpdir"); if (tempPath == null) { throw new IllegalStateException("Java temporary directory is not defined (java.io.tmpdir)"); } return new File(Fs.fileFromPath(tempPath).join("robolectric-libs", getLibName()).getPath()); }
public File getNativeLibraryPath() { String tempPath = System.getProperty("java.io.tmpdir"); if (tempPath == null) { throw new IllegalStateException("Java temporary directory is not defined (java.io.tmpdir)"); } return new File(Fs.fileFromPath(tempPath).join("robolectric-libs", getLibName()).getPath()); }
public void doLoad() { if (loaded) { return; } final long startTime = System.currentTimeMillis(); File tempDir = Files.createTempDir(); tempDir.deleteOnExit(); File extractedLibraryPath = new File(tempDir, getLibName()); try (FileOutputStream outputStream = new FileOutputStream(extractedLibraryPath)) { getLibraryByteSource().copyTo(outputStream); } catch (IOException e) { throw new RuntimeException("Cannot extract SQLite library into " + extractedLibraryPath, e); } loadFromDirectory(tempDir); logWithTime("SQLite natives prepared in", startTime); }