code: public void commit ()
          throws PersistenceException
      {
          // only write ourselves out if we've changed
          if (_storedTileSetID == _nextTileSetID) {
              return;
          }
  
          try {
              BufferedWriter bout = new BufferedWriter(new FileWriter(_mapfile));
              // write out our metadata
              String tline = "" + _nextTileSetID;
              bout.write(tline, 0, tline.length());
              bout.newLine();
              // write out our mappings
              writeMapFile(bout, _map);
              bout.close();
  
          } catch (IOException ioe) {
              String errmsg = "Failure writing map file.";
              throw new PersistenceException(errmsg, ioe);
          }
      }
docs: documentation inherited