@Test public void testOSLibIsReturned() { String OS = System.getProperty("os.name").toLowerCase(); List<String> osNativeLibraries = AsperaLibraryLoader.osLibs(); assertNotNull(osNativeLibraries); if (OS.indexOf("win") >= 0){ assertTrue(osNativeLibraries.contains("faspmanager2.dll")); } else if (OS.indexOf("mac") >= 0) { assertTrue(osNativeLibraries.contains("libfaspmanager2.jnilib")); } else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) { assertTrue(osNativeLibraries.contains("libfaspmanager2.so")); } }
public static List<String> osLibs() { String OS = System.getProperty("os.name").toLowerCase(); if (OS.indexOf("win") >= 0){ return WINDOWS_DYNAMIC_LIBS; } else if (OS.indexOf("mac") >= 0) { return MAC_DYNAMIC_LIBS; } else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) { return UNIX_DYNAMIC_LIBS; } else { throw new AsperaLibraryLoadException("OS is not supported for Aspera"); } }
AsperaLibraryLoader { public static List<String> osLibs() { String OS = System.getProperty("os.name").toLowerCase(); if (OS.indexOf("win") >= 0){ return WINDOWS_DYNAMIC_LIBS; } else if (OS.indexOf("mac") >= 0) { return MAC_DYNAMIC_LIBS; } else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) { return UNIX_DYNAMIC_LIBS; } else { throw new AsperaLibraryLoadException("OS is not supported for Aspera"); } } }
AsperaLibraryLoader { public static List<String> osLibs() { String OS = System.getProperty("os.name").toLowerCase(); if (OS.indexOf("win") >= 0){ return WINDOWS_DYNAMIC_LIBS; } else if (OS.indexOf("mac") >= 0) { return MAC_DYNAMIC_LIBS; } else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) { return UNIX_DYNAMIC_LIBS; } else { throw new AsperaLibraryLoadException("OS is not supported for Aspera"); } }  }
AsperaLibraryLoader { public static List<String> osLibs() { String OS = System.getProperty("os.name").toLowerCase(); if (OS.indexOf("win") >= 0){ return WINDOWS_DYNAMIC_LIBS; } else if (OS.indexOf("mac") >= 0) { return MAC_DYNAMIC_LIBS; } else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) { return UNIX_DYNAMIC_LIBS; } else { throw new AsperaLibraryLoadException("OS is not supported for Aspera"); } }  static String load(); static JarFile createJar(); static String jarVersion(JarFile jar); static void extractJar(JarFile jar, File extractedLocation); static void extractFile(JarFile jar, JarEntry entry, File destPath); static List<String> osLibs(); static void loadLibrary(File extractedPath, List<String> candidates); }
AsperaLibraryLoader { public static List<String> osLibs() { String OS = System.getProperty("os.name").toLowerCase(); if (OS.indexOf("win") >= 0){ return WINDOWS_DYNAMIC_LIBS; } else if (OS.indexOf("mac") >= 0) { return MAC_DYNAMIC_LIBS; } else if (OS.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) { return UNIX_DYNAMIC_LIBS; } else { throw new AsperaLibraryLoadException("OS is not supported for Aspera"); } }  static String load(); static JarFile createJar(); static String jarVersion(JarFile jar); static void extractJar(JarFile jar, File extractedLocation); static void extractFile(JarFile jar, JarEntry entry, File destPath); static List<String> osLibs(); static void loadLibrary(File extractedPath, List<String> candidates);  }