try {
if ((this.filename != filename) && (filename != null))
this.filename = filename;
// Create a new planning file handler
PlanningFileHandler pfh = new PlanningFileHandler(this);
// Open a new file output stream
OutputStream stream = new FileOutputStream(this.filename);
// Save the current planning to the stream
pfh.save(stream);
// Close the current stream
stream.close();
// Clean up
pfh = null;