Logo Search packages:      
Sourcecode: pcalendar version File versions  Download package

void net::sf::linuxorg::pcal::engine::Engine::exportToFile ( final File  file ) throws IOException [inline]

Export list of menstruation dates to a plain text file (Lorg 1.x file version)

Parameters:
fnamename of the file
Returns:
true on success
Exceptions:
IOException

Definition at line 1021 of file Engine.java.

References dateTypes.

Referenced by net::sf::linuxorg::pcal::engine::EngineTest::testImportExport().

      {
            PrintWriter outputStream = null;

            try {
                  outputStream = 
                        new PrintWriter(new FileWriter(file));

                  for(Date d : startDates) {
                        if(dateTypes.get(d) == PCAL_TYPE_MENS) {
                              outputStream.println(DATE_FORMAT.format(d)); 
                        }
                  }
            }
            finally {
                  if (outputStream != null) {
                        outputStream.close();
                  }
            }
      }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index