public void write(final String filename, final OsmTrack t) throws Exception {
        final BufferedWriter bw = new BufferedWriter(new FileWriter(filename));
        bw.write(format(t));
        bw.close();
    }
writes the track in gpx-format to a file

@param filename the filename to write to
@param t        the track to write
main/src/main/java/cgeo/geocaching/brouter/core/Formatter.java