Read exactly X bytes from stream #67975
-
I need to read blocks of data from a stream. If I ask for X bytes, I should get exactly X bytes from the stream unless EOF is reached and then I should get whatever is left. StreamReader has a Is there a built in way to do that or do I have to manually call read over and over and advance my position in my buffer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Loop manually (as documented) or wait for #16598. |
Beta Was this translation helpful? Give feedback.
Loop manually (as documented) or wait for #16598.