If ne1 can help it would be very appreciated. Im running out of time.

Im trying to read records from a text file and put them in a vector but all im getting in the vector is nulls.

I didnt set the varibles to any length so i cant tell the do while loop when to stop.

Is dere any way to get around this?
Please Help!

public void openStream()
{

try
{
File inFile = new File(strBookLoc);
FileInputStream inFileStream = new FileInputStream(inFile);
InputStreamReader in = new InputStreamReader(inFileStream);
BufferedReader bufReader = new BufferedReader(in);

do
{
strTitle = bufReader.readLine();
strAuthor = bufReader.readLine();
strPrice = bufReader.readLine();
strStock = bufReader.readLine();
strDescription = bufReader.readLine();

if (strTitle != null)
{
intPrice = Integer.parseInt(strPrice);
intStock = Integer.parseInt(strStock);
}

i = i + 1;

Bookc bk = new Bookc(strTitle, strAuthor, intPrice, intStock, strDescription);
vtrBook.add(bk);

}while(strTitle != null);

bufReader.close();
}
catch (IOException e)
{
System.out.println("Error reading from file.");
System.out.println("Error message "+e.toString());
}

}