code: private void write() throws IOException
     {
        m_projectFile.validateUniqueIDsForMicrosoftProject();
  
        writeFileCreationRecord();
        writeProjectHeader(m_projectFile.getProjectProperties());
  
        if (m_projectFile.getResources().isEmpty() == false)
        {
           m_resourceModel = new ResourceModel(m_projectFile, m_locale);
           m_writer.write(m_resourceModel.toString());
           for (Resource resource : m_projectFile.getResources())
           {
              writeResource(resource);
           }
        }
  
        if (m_projectFile.getTasks().isEmpty() == false)
        {
           m_taskModel = new TaskModel(m_projectFile, m_locale);
           m_writer.write(m_taskModel.toString());
           writeTasks(m_projectFile.getChildTasks());
        }
  
        m_writer.flush();
     }
docs: Writes the contents of the project file as MPX records.
  
  @throws IOException