code: private Throwable loadFromStream(String _fileNameWithPath, InputStream _libAsStream) {
          String fileExt = getFileExtension(_fileNameWithPath);
          String prefix = _fileNameWithPath.replace(new File(_fileNameWithPath).getParent(), "").replace("." + fileExt, "");
  
          // extract the library
          try {
              File tmpFile = extractToTemp(_libAsStream, prefix, fileExt);
              Throwable loadLibErr = loadLib(tmpFile.getAbsolutePath());
              if (loadLibErr != null) {
                  return loadLibErr;
              }
          } catch (Exception _ex) {
              return _ex;
          }
  
          return null;
      }
docs: Loads a library from the given stream, using the given filename (including path).
  
  @param _fileNameWithPath filename with path
  @param _libAsStream library is input stream
  @return {@link Throwable} if any Exception/Error occurs, null otherwise