/** * Build a configuration object using an XML InputSource object * @param input an <code>InputSource</code> value * @return a <code>Configuration</code> object * @throws SAXException if a parsing error occurs * @throws IOException if an I/O error occurs * @throws ConfigurationException if an error occurs */ public Configuration build( final InputSource input ) throws SAXException, IOException, ConfigurationException { synchronized( this ) { m_handler.clear(); m_parser.parse( input ); return m_handler.getConfiguration(); } }
/** * Build a configuration object from a file using a File object. * @param file a <code>File</code> object * @return a <code>Configuration</code> object * @throws SAXException if a parsing error occurs * @throws IOException if an I/O error occurs * @throws ConfigurationException if an error occurs */ public Configuration buildFromFile( final File file ) throws SAXException, IOException, ConfigurationException { synchronized( this ) { m_handler.clear(); m_parser.parse( file.toURL().toString() ); return m_handler.getConfiguration(); } }