/** * Registers a helper. * * @param classLoader The classloader to use. * @param configUrl Configuration URL to parse * @param helpers The list of helpers to update. * @param constructorClass The constructor parameter class to look for. */ public void registerHelpers( ClassLoader classLoader, java.net.URL configUrl, List<?> helpers, Class<?> constructorClass) { try { BufferedReader reader = null; try { reader = new BufferedReader( new InputStreamReader(configUrl.openStream(), "utf-8"), IoUtils.getBufferSize()); String line = reader.readLine(); while (line != null) { registerHelper(classLoader, getProviderClassName(line), helpers, constructorClass); line = reader.readLine(); } } catch (IOException e) { Context.getCurrentLogger() .log(Level.SEVERE, "Unable to read the provider descriptor: " + configUrl.toString()); } finally { if (reader != null) { reader.close(); } } } catch (IOException ioe) { Context.getCurrentLogger().log(Level.SEVERE, "Exception while detecting the helpers.", ioe); } }