net.kolls.railworld.io
Class YardReader

java.lang.Object
  extended by net.kolls.railworld.io.YardReader

public class YardReader
extends java.lang.Object

Reads Yard Duty (YRD) files. Note that there is not an exact correspondence between Yard Duty and Rail World, so some approximation is done. Reads file format version 1.7


Constructor Summary
YardReader()
           
 
Method Summary
static RailSegment[] read(java.io.File f, MetaData toBeFilled)
          Reads a valid Yard Duty file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YardReader

public YardReader()
Method Detail

read

public static RailSegment[] read(java.io.File f,
                                 MetaData toBeFilled)
                          throws java.io.IOException
Reads a valid Yard Duty file. Note that the format is not well enough understood to throw appropriate format errors.

Parameters:
f - File to read from.
toBeFilled - MetaData to fill.
Returns:
An array of rail segments.
Throws:
java.io.IOException - If the file can't be opened.