code: @Override public void write(ProjectFile projectFile, OutputStream out) throws IOException
     {
        m_projectFile = projectFile;
        m_eventManager = projectFile.getEventManager();
  
        m_writer = new PrintStream(out); // the print stream class is the easiest way to create a text file
        m_buffer = new StringBuilder();
  
        try
        {
           write(); // method call a method, this is how MPXJ is structured, so I followed the lead?
        }
  
        //      catch (Exception e)
        //      { // used during console debugging
        //         System.out.println("Caught Exception in SDEFWriter.java");
        //         System.out.println(" " + e.toString());
        //      }
  
        finally
        { // keeps things cool after we're done
           m_writer = null;
           m_projectFile = null;
           m_buffer = null;
        }
     }
docs: Write a project file in SDEF format to an output stream.
  
  @param projectFile ProjectFile instance
  @param out output stream