Home All Groups Group Topic Archive Search About

BinaryReader and Byte Length

Author
8 Oct 2005 2:54 AM
Tom_B
VB.Net

Using a BinaryReader to read the data coming from a WebResponse stream into
a byte array.

How is the stream byte length determined?

If cannot get the length, what is the best way to move bytes from the stream
to the array?

Thanks.

Author
8 Oct 2005 6:26 AM
Jon Skeet [C# MVP]
Tom_B <T***@discussions.microsoft.com> wrote:
> VB.Net
>
> Using a BinaryReader to read the data coming from a WebResponse stream into
> a byte array.
>
> How is the stream byte length determined?
>
> If cannot get the length, what is the best way to move bytes from the stream
> to the array?

See http://www.pobox.com/~skeet/csharp/readbinary.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

AddThis Social Bookmark Button