com.exponto.jstock.io
Class ReadGenericDataFile

java.lang.Object
  extended bycom.exponto.jstock.io.ReadGenericDataFile

public class ReadGenericDataFile
extends java.lang.Object


Constructor Summary
ReadGenericDataFile()
          Creates a new instance of ReadGenericFile
 
Method Summary
 LogDataSeries readSeries(java.lang.String fN, int numberToGet)
          Read data from file and store the result.
 java.lang.String readString()
          Reads one line of the quotes file, hopefully that is data for one single day.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadGenericDataFile

public ReadGenericDataFile()
Creates a new instance of ReadGenericFile

Method Detail

readSeries

public LogDataSeries readSeries(java.lang.String fN,
                                int numberToGet)
                         throws TickerNotFoundException
Read data from file and store the result. This one uses the column positions from the UserPreferences. Column separators can be '\t',' ', ',' (that is tab, space or comma). Also, in order for the to separate column headers from the data it is required that data lines start with a digit. Curently files can only be read from begin to end, that means it assumes that latest data is at the beginning. (Doesn't matter if whole file is read (numberToGet is larger than number of lines in file.

Throws:
TickerNotFoundException

readString

public final java.lang.String readString()
Reads one line of the quotes file, hopefully that is data for one single day.

Returns:
a string with the line.


Copyright © 2004 Kaare Ranum