/[dotgnu-pnet]/pnetlib/runtime/System/IO/BinaryReader.cs
ViewVC logotype

Diff of /pnetlib/runtime/System/IO/BinaryReader.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by ktreichel, Thu Oct 7 13:58:08 2004 UTC revision 1.8 by drobosson, Wed Aug 31 09:22:46 2005 UTC
# Line 417  public class BinaryReader : IDisposable Line 417  public class BinaryReader : IDisposable
417                                          throw new ArgumentOutOfRangeException                                          throw new ArgumentOutOfRangeException
418                                                  ("count", _("ArgRange_NonNegative"));                                                  ("count", _("ArgRange_NonNegative"));
419                                  }                                  }
420    
421                                  buffer = new byte [count];                                  buffer = new byte [count];
422                                  result = Read(buffer, 0, count);  
423                                  if(result == 0)                                  do
424                                  {                                  {
425                                          throw new EndOfStreamException(_("IO_ReadEndOfStream"));                                          int num2 = Read(buffer, result, count);
426                                            if(num2 == 0)
427                                            {
428                                                    throw new EndOfStreamException(_("IO_ReadEndOfStream"));
429                                                    break;
430                                            }
431                                            result += num2;
432                                            count -= num2;
433                                  }                                  }
434                                  if(result != count)                                  while(count > 0);
435    
436                                    if(result != buffer.Length)
437                                  {                                  {
438                                          byte[] newBuffer = new byte [result];                                          byte[] newBuffer = new byte [result];
439                                          Array.Copy(buffer, newBuffer, result);                                          Array.Copy(buffer, newBuffer, result);

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26