code: @Override public ProjectFile read(InputStream stream) throws MPXJException
     {
        try
        {
           m_projectFile = new ProjectFile();
           m_eventManager = m_projectFile.getEventManager();
  
           ProjectConfig config = m_projectFile.getProjectConfig();
           config.setAutoTaskUniqueID(false);
           config.setAutoResourceUniqueID(false);
           config.setAutoOutlineLevel(false);
           config.setAutoOutlineNumber(false);
           config.setAutoWBS(false);
  
           m_projectFile.getProjectProperties().setFileApplication("Planner");
           m_projectFile.getProjectProperties().setFileType("XML");
  
           m_eventManager.addProjectListeners(m_projectListeners);
  
           SAXParserFactory factory = SAXParserFactory.newInstance();
           factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
           factory.setNamespaceAware(true);
           SAXParser saxParser = factory.newSAXParser();
           XMLReader xmlReader = saxParser.getXMLReader();
           SAXSource doc = new SAXSource(xmlReader, new InputSource(stream));
  
           if (CONTEXT == null)
           {
              throw CONTEXT_EXCEPTION;
           }
  
           Unmarshaller unmarshaller = CONTEXT.createUnmarshaller();
  
           Project plannerProject = (Project) unmarshaller.unmarshal(doc);
  
           readProjectProperties(plannerProject);
           readCalendars(plannerProject);
           readResources(plannerProject);
           readTasks(plannerProject);
           readAssignments(plannerProject);
  
           //
           // Ensure that the unique ID counters are correct
           //
           config.updateUniqueCounters();
  
           return (m_projectFile);
        }
  
        catch (ParserConfigurationException ex)
        {
           throw new MPXJException("Failed to parse file", ex);
        }
  
        catch (JAXBException ex)
        {
           throw new MPXJException("Failed to parse file", ex);
        }
  
        catch (SAXException ex)
        {
           throw new MPXJException("Failed to parse file", ex);
        }
  
        finally
        {
           m_projectFile = null;
           m_defaultCalendar = null;
        }
     }
docs: {@inheritDoc}