The read method returns the number of bytes consumed from the input stream and stored in the provided buffer.
The only case the read method would return 0 is when a buffer of length 0 is provided since there would be no place to store any bytes consumed from the input stream. In most cases, a fixed length buffer is allocated and the input stream is consumed in chunks by reading it into the buffer, do something with the contents of the buffer and then iterate until the whole stream has been consumed. I hope this helps. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/24d989ae-fdfd-45ed-ae21-ad0e53912564%40googlegroups.com.