/** * Configures this manager from an XML configuration file. * * @param configUri The URI of the configuration. * @param configStream An InputStream containing the configuration. * @throws FileSystemException if an error occurs. */ @SuppressWarnings("unused") private void configure(final String configUri, final InputStream configStream) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); final Element config = builder.parse(configStream).getDocumentElement(); configure(config); } catch (final Exception e) { throw new FileSystemException("vfs.impl/load-config.error", configUri, e); } }
/** * Configures this manager from an XML configuration file. * * @param configUri The URI of the configuration. * @param configStream An InputStream containing the configuration. * @throws FileSystemException if an error occurs. */ @SuppressWarnings("unused") private void configure(final String configUri, final InputStream configStream) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); final Element config = builder.parse(configStream).getDocumentElement(); configure(config); } catch (final Exception e) { throw new FileSystemException("vfs.impl/load-config.error", configUri, e); } }
/** * Configures this manager from an XML configuration file. * * @param configUri The URI of the configuration. * @param configStream An InputStream containing the configuration. * @throws FileSystemException if an error occurs. */ @SuppressWarnings("unused") private void configure(final String configUri, final InputStream configStream) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); final Element config = builder.parse(configStream).getDocumentElement(); configure(config); } catch (final Exception e) { throw new FileSystemException("vfs.impl/load-config.error", configUri, e); } }
/** * Configures this manager from an XML configuration file. * * @param configUri The URI of the configuration. * @throws FileSystemException if an error occus. */ private void configure(final URL configUri) throws FileSystemException { InputStream configStream = null; try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); configStream = configUri.openStream(); final Element config = builder.parse(configStream).getDocumentElement(); configure(config); } catch (final Exception e) { throw new FileSystemException("vfs.impl/load-config.error", configUri.toString(), e); } finally { if (configStream != null) { try { configStream.close(); } catch (final IOException e) { getLogger().warn(e.getLocalizedMessage(), e); } } } }
/** * Configures this manager from an XML configuration file. * * @param configUri The URI of the configuration. * @throws FileSystemException if an error occus. */ private void configure(final URL configUri) throws FileSystemException { InputStream configStream = null; try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); configStream = configUri.openStream(); final Element config = builder.parse(configStream).getDocumentElement(); configure(config); } catch (final Exception e) { throw new FileSystemException("vfs.impl/load-config.error", configUri.toString(), e); } finally { if (configStream != null) { try { configStream.close(); } catch (final IOException e) { getLogger().warn(e.getLocalizedMessage(), e); } } } }
/** * Configures this manager from an XML configuration file. * * @param configUri The URI of the configuration. * @param configStream An InputStream containing the configuration. * @throws FileSystemException if an error occurs. */ @SuppressWarnings("unused") private void configure(final String configUri, final InputStream configStream) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); final Element config = builder.parse(configStream).getDocumentElement(); configure(config); } catch (final Exception e) { throw new FileSystemException("vfs.impl/load-config.error", configUri, e); } }
/** * Configures this manager from an XML configuration file. * * @param configUri The URI of the configuration. * @throws FileSystemException if an error occus. */ private void configure(final URL configUri) throws FileSystemException { InputStream configStream = null; try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); configStream = configUri.openStream(); final Element config = builder.parse(configStream).getDocumentElement(); configure(config); } catch (final Exception e) { throw new FileSystemException("vfs.impl/load-config.error", configUri.toString(), e); } finally { if (configStream != null) { try { configStream.close(); } catch (final IOException e) { getLogger().warn(e.getLocalizedMessage(), e); } } } }
final DocumentBuilder builder = createDocumentBuilder(); configStream = configUri.openStream(); final Element config = builder.parse(configStream).getDocumentElement();