[Mono-list] StreamReader.cs (ReadBuffer)

Mike Kestner mkestner@speakeasy.net
25 Mar 2002 10:19:17 -0600


On Mon, 2002-03-25 at 10:09, Mike Kestner wrote:
 
> The docs are apparently conflicting on this.  MemoryStream::Read()
> specifies both that the count is a "maximum" number of bytes to read,
> and that exceptions should be thrown if it is out of range.  I think the
> correct behavior should be to not throw an exception and return the
> actual number of bytes copied into the buffer.
> 
> So, I think the correct fix is to remove the exception from
> MemoryStream.

Oops, just reread some stuff.  The docs are not conflicting.  I just
submitted the correct fix to MemoryStream.  It was throwing the
exception based on internalBuffer.Length, when it should've been
throwing it on the passed in buffer.

Mike