if (in == null) {
log.error("Cannot find native IO library");
return false;
}
ByteArrayBuilder libData = readStream(in);
in.close();
String tmpDir = System.getProperty("java.io.tmpdir", "/tmp");
File dll = new File(tmpDir, "libonenio." + crc32(libData) + ".so");
if (!dll.exists()) {
OutputStream out = new FileOutputStream(dll);
out.write(libData.buffer(), 0, libData.length());
out.close();
}
String libraryPath = dll.getAbsolutePath();
System.load(libraryPath);