I forgot to mention that before I set the readAhead property I was obtaining several progress events and the complete event once the file was fully read. However I need to process the data in chunks and was unable to keep up. That's when I stumbled on the property in question.
After isolating the code and running the basic example in the api for readAhead it seems that the intent is to only allow a single read from the file for the number of bytes specified by readAhead. Please sound off if I'm mistaken.
I'm with dshmif, I also would like to know how this readAhead works..! if I would have a 200 bytes of files, and the readAhead is of 100 bytes, then in the bytesArray how do i stores the positions? will it be 1st time fileStream.readBytes(results, 0, 100), and then next time it would be fileStream.readBytes(results, 101, 100) ?
I'm also a little confuse, since the progressEvent bytesAvailable shows the whole 200 bytes, and the readAhead example in the Adobe LiveDocs not quite satisfactory!