Class TrackFileParser

java.lang.Object
  extended byTrackFileParser

public class TrackFileParser
extends java.lang.Object

Class TrackFileParser reads and parses a track file (../tracks/*.track) from the disk and creates a new Track object based on it.

This class is used by calling the parseTrack (String filename) method, which returns a Track object if successful.

Version:
1.0
Author:
Stefan Brockmann, Tero Kuusela
See Also:
Track

Constructor Summary
TrackFileParser()
          Default constructor.
 
Method Summary
 Track parseTrack(java.lang.String filename)
          The actual creation of a Track object.
private  java.util.Vector readFile(java.io.File file)
          The track file is first read in a vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackFileParser

public TrackFileParser()
Default constructor.

Method Detail

readFile

private java.util.Vector readFile(java.io.File file)
The track file is first read in a vector.

In this phase, the comment lines are removed.

Parameters:
file - track file

parseTrack

public Track parseTrack(java.lang.String filename)
The actual creation of a Track object.

Parameters:
filename - Name of the track file in relation to the working directory (e.g. "../tracks/default.track").