public XExtension parse ( File file ) throws IOException , ParserConfigurationException , SAXException { BufferedInputStream is = new BufferedInputStream ( new FileInputStream ( file ) ) ; // set up a specialized SAX2 handler to fill the container XExtensionHandler handler = new XExtensionHandler ( ) ; // set up SAX parser and parse provided log file into the container SAXParserFactory parserFactory = SAXParserFactory . newInstance ( ) ; SAXParser parser = parserFactory . newSAXParser ( ) ; parser . parse ( is , handler ) ; is . close ( ) ; return handler . getExtension ( ) ; }
Parses an extension from a definition file .