public void writeBinary(final String filename) throws Exception {
        final DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(filename)));

        endPoint.writeToStream(dos);
        dos.writeInt(nodes.size());
        for (OsmPathElement node : nodes) {
            node.writeToStream(dos);
        }
        dos.writeLong(nogoChecksums[0]);
        dos.writeLong(nogoChecksums[1]);
        dos.writeLong(nogoChecksums[2]);
        dos.writeBoolean(isDirty);
        dos.writeLong(profileTimestamp);
        dos.close();
    }
writes the track in binary-format to a file

@param filename the filename to write to
main/src/main/java/cgeo/geocaching/brouter/core/OsmTrack.java