Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 4 - Huffman Trees (Part 1)
Date: Mon Oct 8 2001 11:32 pm
Author: Cipriani, Jason A. <jac4@andrew.cmu.edu>
Subject: Re: EOF?

well, after the first pass through the input file, the file position is at the end of the file. so, trying a second pass would cause an EOFException.

you have to remember to call inputStream.reset() before the second pass (and even before the first one, just to be safe). this will reset the file pointer back to the beginning of the file.

sorry if that doesn't help.

jason
Post response

Go to the previous messageGo to the following message
Current Thread Detail:
EOF?      Dozzi, Giancarlo      Mon Oct 8 2001 11:28 pm       
Re: EOF?      Dozzi, Giancarlo      Mon Oct 8 2001 11:30 pm       
Re: EOF?      Cipriani, Jason A.      Mon Oct 8 2001 11:32 pm       
Re: EOF?      Dozzi, Giancarlo      Tue Oct 9 2001 10:56 am       
Re: EOF?      Chen, Richard      Thu Oct 11 2001 9:49 pm       
Re: EOF?      Bortz, Andrew S.      Thu Oct 11 2001 10:01 pm       
EOF and /211hw/hw4/textfiles/...      Chen, Richard      Fri Oct 12 2001 2:57 pm       

Back to previous screen