private ProjectFile readFile ( File file ) throws MPXJException { try { String url = "jdbc:sqlite:" + file . getAbsolutePath ( ) ; Properties props = new Properties ( ) ; m_connection = org . sqlite . JDBC . createConnection ( url , props ) ; m_documentBuilder = DocumentBuilderFactory . newInstance ( ) . newDocumentBuilder ( ) ; XPathFactory xPathfactory = XPathFactory . newInstance ( ) ; XPath xpath = xPathfactory . newXPath ( ) ; m_dayTimeIntervals = xpath . compile ( "/array/dayTimeInterval" ) ; m_entityMap = new HashMap < String , Integer > ( ) ; return read ( ) ; } catch ( Exception ex ) { throw new MPXJException ( MPXJException . INVALID_FORMAT , ex ) ; } finally { if ( m_connection != null ) { try { m_connection . close ( ) ; } catch ( SQLException ex ) { // silently ignore exceptions when closing connection } } m_documentBuilder = null ; m_dayTimeIntervals = null ; m_entityMap = null ; } }
By the time we reach this method we should be looking at the SQLite database file itself .