Daniel Boelzle wrote: > If nsIInputStream::available() denotes the *currently* available number > of bytes, then why do some samples only use available() once to read out > the entire data?
Because those samples are buggy? Most likely because the author of the code didn't actually test it very well against arbitrary streams. > <http://developer.mozilla.org/en/docs/Code_snippets:File_I/O#Binary_File> In the particular case of a file input stream, I believe all the data is available immediately. But that code, as written, is certainly very fragile. -Boris _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
