for( int tryCount=0; !done && tryCount<5; tryCount++ )
{
try
{
input = new BufferedInputStream(
new RandomAccessFileInputStream( file, position, length ), BUFFER_SIZE );
unFilteredStream = new RandomAccessFileOutputStream( file );
filter.decode( input, unFilteredStream, this, filterIndex );
done = true;
}
catch( IOException io )
{
length--;
exception = io;
}
}
if( !done )
{
//if no good stream was found then lets try again but with the
//length of data that was actually read and not length
//defined in the dictionary
length = writtenLength;
for( int tryCount=0; !done && tryCount<5; tryCount++ )
{
try
{
input = new BufferedInputStream(
new RandomAccessFileInputStream( file, position, length ), BUFFER_SIZE );
unFilteredStream = new RandomAccessFileOutputStream( file );
filter.decode( input, unFilteredStream, this, filterIndex );
done = true;
}
catch( IOException io )