diff options
author | Philippe Laferriere <laferriere.phil@gmail.com> | 2015-06-28 10:08:25 -0400 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2015-08-03 20:44:41 -0700 |
commit | 6b6bd214977981512cca9bee5c4a58d16aec7378 (patch) | |
tree | 3af0ed138a1634cfd6a42714839c142cacb5f4af | |
parent | cb660ab3d311ee16cc8275bdca2b3a566edf5081 (diff) | |
download | node-6b6bd214977981512cca9bee5c4a58d16aec7378.tar.gz |
doc: Clarified read method with specified size argument.
Made explicitely clear that when size bytes are not available, it will
return null, unless we've ended, in which case the data remaining in the
buffer will be returned.
Fixes #7273
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/joyent/node/pull/25591
-rw-r--r-- | doc/api/stream.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/stream.markdown b/doc/api/stream.markdown index 3c879eac1..b3859d343 100644 --- a/doc/api/stream.markdown +++ b/doc/api/stream.markdown @@ -227,7 +227,9 @@ returns it. If there is no data available, then it will return `null`. If you pass in a `size` argument, then it will return that many -bytes. If `size` bytes are not available, then it will return `null`. +bytes. If `size` bytes are not available, then it will return `null`, +unless we've ended, in which case it will return the data remaining +in the buffer. If you do not specify a `size` argument, then it will return all the data in the internal buffer. |