Discussion Board
Go to the previous messageGo to the following message
Current Forum: Homework 4 - Huffman Trees (Part 1)
Date: Thu Oct 11 2001 10:01 pm
Author: Bortz, Andrew S. <abortz@andrew.cmu.edu>
Subject: Re: EOF?

I nice convention that you can use because the BitReader throws EOFException's when you get to the end, is this:

try {
while (true) {
// Insert reading and processing code here
}
} catch (EOFException e) {}

That'll let you read through the file and not have to check for the EOF.
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