import java.io.*;
import java.util.*;


/**
 * A class for reading FutureQuotation information
 * from a BufferedReader
 *
 *
 * @version 1.0
 * @author  Prof. David Bernstein, James Madison University
 *
 */
 public class FutureReader extends SecurityReader
 {
    protected TickerSymbol   symbol;


    /**
     * Construct a new FutureReader
     *
     * @param reader   The BufferedReader to use
     */
     public FutureReader(BufferedReader reader, TickerSymbol symbol)
     {
			super(reader);
			this.symbol = symbol;
     }


    /**
     * Read an entry
     *
     */
    	public SecurityQuotation readSecurity() throws IOException,
                                            NoSuchElementException,
                                            NumberFormatException
     {
			String     			line;
         FutureQuotation  	tempFutureQuotation; 

			line = reader.readLine();
			if (line == null) 
				return null;

	      tempFutureQuotation = FutureQuotation.parseFutureQuotation(symbol, line);
			return tempFutureQuotation;
    }


}// end FutureReader
