}
copyInputStreamToFile(connection.getInputStream(), cachedFile);
}
if (extensionJarOrDllFile.endsWith(".jar")) {
// Add tmp file to extension jars list
extensionJars.add(new JarFile(cachedFile.toString(), false));
} else if (extensionJarOrDllFile.endsWith(dllSuffix)) {
// Add tmp file to extension DLLs map
this.extensionDlls.put(extensionJarOrDllFileName.substring(extensionPrefix.length(),
extensionJarOrDllFileName.indexOf(dllSuffix)), cachedFile.toString());
}
continue;
} catch (IOException ex) {
// Try without cache
}
}
if (connection == null) {
connection = extensionJarOrDllUrl.openConnection();
}
InputStream input = connection.getInputStream();
if (extensionJarOrDllFile.endsWith(".jar")) {
// Copy jar to a tmp file
String extensionJar = copyInputStreamToTmpFile(input, ".jar");
// Add tmp file to extension jars list
extensionJars.add(new JarFile(extensionJar, false));
} else if (extensionJarOrDllFile.endsWith(dllSuffix)) {
// Copy DLL to a tmp file
String extensionDll = copyInputStreamToTmpFile(input, dllSuffix);
// Add tmp file to extension DLLs map
this.extensionDlls.put(extensionJarOrDllFileName.substring(extensionPrefix.length(),