[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO StreamWriter.cs,1.2
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO StreamWriter.cs,1.2,1.3 |
Date: |
Mon, 11 Nov 2002 01:02:35 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO
In directory subversions:/tmp/cvs-serv10456/runtime/System/IO
Modified Files:
StreamWriter.cs
Log Message:
Add code to output strings, single characters, and buffers of chars to stream.
Index: StreamWriter.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/runtime/System/IO/StreamWriter.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** StreamWriter.cs 20 Dec 2001 10:11:39 -0000 1.2
--- StreamWriter.cs 11 Nov 2002 06:02:32 -0000 1.3
***************
*** 213,224 ****
// Write a string to the stream writer.
- [TODO]
public override void Write(String value)
{
! // TODO
}
// Write a buffer of characters to this stream writer.
- [TODO]
public override void Write(char[] buffer, int index, int count)
{
--- 213,229 ----
// Write a string to the stream writer.
public override void Write(String value)
{
! char[] chars;
!
! if(value == null)
! {
! throw new
ArgumentNullException("value");
! }
! chars = value.ToCharArray();
! Write(chars, 0, chars.Length);
}
// Write a buffer of characters to this stream writer.
public override void Write(char[] buffer, int index, int count)
{
***************
*** 242,246 ****
(_("Arg_InvalidArrayRange"));
}
! // TODO
}
public override void Write(char[] buffer)
--- 247,264 ----
(_("Arg_InvalidArrayRange"));
}
!
! while (count > 0)
! {
! if (this.outBufferLen >=
this.bufferSize - 1)
! {
! stream.Write(outBuffer,
outBufferPosn,
!
outBufferLen - outBufferPosn);
! outBufferPosn = 0;
! outBufferLen = 0;
! stream.Flush();
! }
! this.outBuffer[this.outBufferLen++] =
(byte) buffer[index++];
! --count;
! }
}
public override void Write(char[] buffer)
***************
*** 254,261 ****
// Write a single character to this stream writer.
- [TODO]
public override void Write(char value)
{
! // TODO
}
--- 272,281 ----
// Write a single character to this stream writer.
public override void Write(char value)
{
! char[] bfr;
!
! bfr[0] = value;
! Write(bfr, 0, 1);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/IO StreamWriter.cs,1.2,1.3,
Rhys Weatherley <address@hidden> <=