I’m trying to be certain data from an input stream is completely loaded before passing it to a formatReader. The issue is that occasionally the reader will either, validate and pass back an only partially loaded file, or b, return false before the stream is completed. I have a relatively simple background thread which is handling the io, this causes the loop to jump back to the top and restart the download, even though it is 95% finished.
Perhaps I’m doing something wrong, but is it true that isExhausted() should definitely be true when the input stream is finished reading? Should the inputStream only be moving to the next block of code after it’s 100% complete?