code: private void writeNotes(int recordNumber, String text) throws IOException
     {
        m_buffer.setLength(0);
  
        m_buffer.append(recordNumber);
        m_buffer.append(m_delimiter);
  
        if (text != null)
        {
           String note = stripLineBreaks(text, MPXConstants.EOL_PLACEHOLDER_STRING);
           boolean quote = (note.indexOf(m_delimiter) != -1 || note.indexOf('"') != -1);
           int length = note.length();
           char c;
  
           if (quote == true)
           {
              m_buffer.append('"');
           }
  
           for (int loop = 0; loop < length; loop++)
           {
              c = note.charAt(loop);
  
              switch (c)
              {
                 case '"':
                 {
                    m_buffer.append("\"\"");
                    break;
                 }
  
                 default:
                 {
                    m_buffer.append(c);
                    break;
                 }
              }
           }
  
           if (quote == true)
           {
              m_buffer.append('"');
           }
        }
  
        m_buffer.append(MPXConstants.EOL);
  
        m_writer.write(m_buffer.toString());
     }
docs: Write notes.
  
  @param recordNumber record number
  @param text note text
  @throws IOException