Commit Graph
53 Commits
Author SHA1 Message Date
Atsushi Eno d26a2ab039 2007-11-02 Atsushi Enomoto <[email protected]>
* StreamReader.cs : Encoding.GetMaxCharCount() does not always return
	  the maximum max char count for Decoder.GetChars() since it might
	  contain pending buffer by flush. Fixed bug #338370.


svn path=/trunk/mcs/; revision=88712
2007-11-02 09:37:12 +00:00
Dick Porter 5b79519900 2007-04-30 Dick Porter <[email protected]>
* Directory.cs: 
	* FileShare.cs: 
	* DirectoryNotFoundException.cs: 
	* SeekOrigin.cs: 
	* FileAttributes.cs: 
	* IOException.cs: 
	* MemoryStream.cs: 
	* FileMode.cs: 
	* BinaryWriter.cs: 
	* TextWriter.cs: 
	* File.cs: 
	* BinaryReader.cs: 
	* TextReader.cs: 
	* UnmanagedMemoryStream.cs: 
	* StringWriter.cs: 
	* FileAccess.cs: 
	* FileLoadException.cs: 
	* BufferedStream.cs: 
	* Stream.cs: 
	* FileInfo.cs: 
	* FileStream.cs:
	* StringReader.cs: 
	* StreamWriter.cs: 
	* EndOfStreamException.cs: 
	* DriveInfo.cs: 
	* StreamReader.cs: 
	* PathTooLongException.cs: 
	* DriveType.cs: 
	* FileNotFoundException.cs: 2.0 profile updates



svn path=/trunk/mcs/; revision=76495
2007-04-30 14:05:12 +00:00
Miguel de Icaza c6e197166f Add support for detecting UTF32 and UTF-32 bigendian
patch from  Peter Dettman ([email protected])


svn path=/trunk/mcs/; revision=73779
2007-03-06 04:26:50 +00:00
Gert Driesen c6856bc091 * StreamReader.cs: Removed checks for non-existing directory or file,
since these checks are also performed in FileStream.

Note: ChangeLog went in with separate commit.

svn path=/trunk/mcs/; revision=72060
2007-01-31 22:33:10 +00:00
Gonzalo Paniagua Javier 167ec9bddd 2007-01-24 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: fix for bug #75526. We return earlier from Read () if
	the underlying stream might block or end on the next read.


svn path=/trunk/mcs/; revision=71650
2007-01-25 06:12:54 +00:00
Miguel de Icaza 93e6ec21f7 revert, this was a mistake
svn path=/trunk/mcs/; revision=71617
2007-01-24 18:37:03 +00:00
Miguel de Icaza ec090a9505 2007-01-23 Miguel de Icaza <[email protected]>
* StreamReader.cs (Read): Fix this overload, we were just lucky
	that it worked in the past.   Must trigger a load from the buffer
	if we reached its end.

svn path=/trunk/mcs/; revision=71573
2007-01-24 00:45:35 +00:00
Gonzalo Paniagua Javier 2dd8186026 2006-08-30 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: avoid ArgumentOutRangeException when the underlying
	stream returns -1 on Read.


svn path=/trunk/mcs/; revision=64568
2006-08-30 18:27:44 +00:00
Atsushi Eno ad24284d1a 2006-04-28 Atsushi Enomoto <[email protected]>
* StreamReader.cs : implemented EndOfStream property.
	* File.cs : implemented AppendAllText(), WriteAllLines(),
	  WriteAllBytes() and ReadAllLines(). Bug #77813 fixed.


svn path=/trunk/mcs/; revision=60046
2006-04-28 17:14:16 +00:00
Gonzalo Paniagua Javier d792f22837 2006-01-20 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: (ReadToEnd) if Read returns -1 or 0, we're done.


svn path=/trunk/mcs/; revision=55842
2006-01-20 16:57:23 +00:00
Joshua Tauberer f040522e22 StreamReader.cs: Avoid two totally unnecessary string creations. (totally pedantic)
svn path=/trunk/mcs/; revision=55698
2006-01-17 21:38:03 +00:00
Gonzalo Paniagua Javier 035c97a148 2005-10-20 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: made ReadLine() less memory-hungry. Fixes bug #76399.


svn path=/trunk/mcs/; revision=52004
2005-10-20 20:28:48 +00:00
Raja R Harinath cdb301b708 Fix #75679.
* StreamReader.cs (DiscardBufferedData): Reset the decoder too.

(r=eno)

svn path=/trunk/mcs/; revision=48719
2005-08-23 12:17:17 +00:00
Lluis Sanchez 92673ba006 * StreamReader.cs: In DiscardBufferedData(), reset the mayBlock flag.
svn path=/trunk/mcs/; revision=30288
2004-06-24 09:34:12 +00:00
Atsushi Eno 5412643255 2004-06-21 Atsushi Enomoto <[email protected]>
* FileStream.cs : Check buffer size before creating file.
	* StreamReader.cs : Check encoding!=null before creating file.
	* File.cs,
	  MonoIO.cs : Convert DateTime to FileTime after checking
	  file IO sharing violation (it just fixes the type of exception).

svn path=/trunk/mcs/; revision=30033
2004-06-21 13:30:46 +00:00
Duncan Mak 13d1764537 Add license and copyright to all source files in corlib
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Duncan Mak 560c5a0645 (StreamReader):
(Initialize): Add a check that buffer_size must not be less than
or equal to zero.

svn path=/trunk/mcs/; revision=29056
2004-06-08 19:08:03 +00:00
Sebastien Pouliot 03b1d4987c 2004-05-24 Sebastien Pouliot <[email protected]>
* StreamReader.cs: Add checks for null encoding. Fixed possible integer
	overflow and ArgumentNullException in Read.

svn path=/trunk/mcs/; revision=28000
2004-05-24 20:15:47 +00:00
Miguel de Icaza 7c95f0650a A couple more TODOs
svn path=/trunk/mcs/; revision=20012
2003-11-14 22:32:04 +00:00
Gonzalo Paniagua Javier 6e323452f6 2003-11-14 Gonzalo Paniagua Javier <[email protected]>
* FileStream.cs: use the argument name when throwing exception.

	* StreamReader.cs:
	* StringReader.cs:
	* TextReader.cs: added [In] attribute for the array in Read.

svn path=/trunk/mcs/; revision=19987
2003-11-14 04:06:38 +00:00
Miguel de Icaza a61252bd95 2003-10-28 Miguel de Icaza <[email protected]>
* StreamReader.cs: Add checks for disposed stream from bug report
	#48696 (Patrik Reali)

	* TextReader.cs (Read): Return the total number of bytes read,
	patch from Patrik Realli.

svn path=/trunk/mcs/; revision=19435
2003-10-28 17:55:05 +00:00
Martin Baulig a93aa128ac 2003-08-05 Martin Baulig <[email protected]>
* StreamReader.cs (DiscardBufferedData): Do the same like on the
	ms runtime: just discard the buffered data, but don't modify the
	BaseStream.Position.

svn path=/trunk/mcs/; revision=17081
2003-08-05 23:44:24 +00:00
Martin Baulig f8ff4a9743 2003-08-05 Martin Baulig <[email protected]>
* StreamReader.cs (DiscardBufferedData): This is only allowed on
	seekable streams.

svn path=/trunk/mcs/; revision=17076
2003-08-05 20:19:38 +00:00
Martin Baulig 2ac3dab1ba 2003-08-04 Martin Baulig <[email protected]>
* StreamReader.cs (DiscardBufferedData): Implemented.

svn path=/trunk/mcs/; revision=17051
2003-08-04 13:32:10 +00:00
Miguel de Icaza 13c56abe99 2003-07-24 Miguel de Icaza <[email protected]>
* Type.cs: Added generics stubs.

2003-07-24  Miguel de Icaza  <[email protected]>

	* ArrayList.cs: Removed MonoTODO.

2003-07-24  Miguel de Icaza  <[email protected]>

	* TypeDelegator.cs: Added generics stubs.

2003-07-24  Miguel de Icaza  <[email protected]>

	* TypeBuilder.cs: Added generics stubs.

	* EnumBuilder.cs: Added generics  stubs, changed bracing style for
	routines.

svn path=/trunk/mcs/; revision=16621
2003-07-24 20:26:37 +00:00
Duncan Mak a2b66b251f * DateTimeFormatInfo.cs: theInvariantDateTimeFormatInfo should not
be public.

* StreamReader.cs (Initialize): This method is not exposed in the
API, mark as internal.

* SignatureHelper.cs: This class does not have the
SerializableAttribute.

* WaitHandle.cs (CheckDisposed): This method is not in the public
API, mark it as 'internal'.

* Environment.cs (SpecialFolder): Added 'Desktop' and 'MyComputer'
as values for NET_1_1.
(GetFolderPath): Return the empty string ("") for values of
SpecialFolder that have no corresponding equivalents in
Linux. Return "$HOME/Desktop" for SpecialFolder.DesktopDirectory
and "$HOME" for SpecialFolder.Personal.

* IntPtr.cs (GetObjectData): Mark it as an interface
implementation, instead of a public method.

* Guid.cs (NewGuid): Remove MonoTODOAttribute.

* TypeLoadException.cs (GetObjectData):
Create stubs for the fields that are being serialized.

* UIntPtr.cs: Removed erroneous CLSCompliantAttributes.

svn path=/trunk/mcs/; revision=16594
2003-07-24 03:28:43 +00:00
Gonzalo Paniagua Javier b76faa4b6e 2003-05-04 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs:
	(.ctor): fixed parameters passed to FileNotFoundException.

svn path=/trunk/mcs/; revision=14241
2003-05-04 02:43:21 +00:00
Gonzalo Paniagua Javier 0f62bbab30 2003-03-07 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: fixed bug #39280.

svn path=/trunk/mcs/; revision=12321
2003-03-07 18:47:04 +00:00
Gonzalo Paniagua Javier 66f65c4774 2002-11-07 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: Changed all Encoding.UTF8 to Encoding.UTF8Unmarked.

svn path=/trunk/mcs/; revision=8861
2002-11-07 00:24:24 +00:00
Gonzalo Paniagua Javier 71752a091e 2002-10-21 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: ReadLine now treats a \r not followed by a \n as a
	\n (this is what MS does).

svn path=/trunk/mcs/; revision=8448
2002-10-21 16:40:28 +00:00
Gonzalo Paniagua Javier 2cf49db82d 2002-09-27 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: give more information when wrong parameters passed.

svn path=/trunk/mcs/; revision=7878
2002-09-27 23:28:45 +00:00
Miguel de Icaza 2eefff50b3 2002-09-06 Miguel de Icaza <[email protected]>
* Console.cs: Specify an encoder, otherwise we will get the UTF8
	encoder that by default emits the byte markers.

2002-09-06  Miguel de Icaza  <[email protected]>

	* StreamReader.cs: Implement detection of byte marks and skipping
	of byte marks at the beginning of the stream.

	(ReadToEnd): Use buffered read instead of char-by-char
	processing.

	Correct the default arguments for creating the StreamReader.

2002-09-06  Miguel de Icaza  <[email protected]>

	* Encoding.cs (UTF8, Unicode): Create with a preamble, that is
	what the Microsoft version does.

	(UnixConsoleEncoding): New internal method, used to get the
	encoding, in the future, this should pull the locale, map to
	charset and then code page.

svn path=/trunk/mcs/; revision=7295
2002-09-06 23:57:02 +00:00
Gonzalo Paniagua Javier 5bf2383288 2002-08-27 Gonzalo Paniagua Javier <[email protected]>
* System.IO/BinaryReader.cs:
	* System.IO/BinaryWriter.cs:
	* System.IO/MemoryStream.cs:
	* System.IO/StreamReader.cs:
	* System.IO/StreamWriter.cs:
	* System.IO/StringReader.cs:
	* System.IO/StringWriter.cs:
	* System.IO/TextWriter.cs:
	* System.Threading/WaitHandle.cs: IDisposable fixes.

svn path=/trunk/mcs/; revision=7118
2002-08-28 02:30:47 +00:00
Miguel de Icaza d46fda6d71 2002-08-24 Miguel de Icaza <[email protected]>
* StreamReader.cs: Removed TODOs, as the code seems to be
	complete.

svn path=/trunk/mcs/; revision=7017
2002-08-25 00:04:06 +00:00
Gonzalo Paniagua Javier a1d3678325 2002-08-23 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs: implemented NullStreamReader.

svn path=/trunk/mcs/; revision=6934
2002-08-23 06:45:48 +00:00
Duncan Mak 9d55c814e2 2002-07-31 Duncan Mak <[email protected]>
* StreamReader.cs:
	(Dispose): Added and implmented.

	* StreamWriter.cs:
	(Dispose): Fixed visibility.
	(Initialize): Fixed visibility, made internal.

	* BinaryReader.cs:
	(Dispose): Fixed visibility.

svn path=/trunk/mcs/; revision=6279
2002-07-31 11:11:54 +00:00
Mike Kestner a1282a284c 2002-07-02 Mike Kestner <[email protected]>
* StreamReader.cs: Guard against ^\n lines as pointed out by Gonzalo.

svn path=/trunk/mcs/; revision=5560
2002-07-03 00:45:41 +00:00
Mike Kestner b6e95be946 2002-07-02 Mike Kestner <[email protected]>
* StreamReader.cs: Revert the last Peek change and fix the ReadLine
	end of line detection code instead.

svn path=/trunk/mcs/; revision=5559
2002-07-03 00:18:22 +00:00
Gonzalo Paniagua Javier 9cd689ad52 2002-07-02 Gonzalo Paniagua Javier <[email protected]>
* StreamReader.cs:
	(Peek): no need to have seek capabilitites.

svn path=/trunk/mcs/; revision=5549
2002-07-02 18:17:53 +00:00
Nick Drochak eda2a59d10 2002-05-15 Nick Drochak <[email protected]>
* Path.cs (GetDirectoryName): Return String.Empty if there is no
	directory

	* StreamReader.cs: Add some parameter checking on file names.

	* StreamWriter.cs: Add some parameter checking on file names.

svn path=/trunk/mcs/; revision=4626
2002-05-14 11:46:20 +00:00
Piers Haken 9e63489461 Miscellaneous minor compliancy fixes:
* System/System/UriBuilder.cs: use visible EscapeString
	* corlib/System.Reflection/ManifestResourceInfo.cs: constructor access, define fields
	* corlib/System/Convert.cs: remove erroneous CLSCompliant attributes
	* corlib/System/Math.cs: remove erroneous CLSCompliant attribute

	Fix enum values:
	* System/System.CodeDom/CodeBinaryOperatorType.cs
	* System/System.Net.Sockets/ProtocolFamily.cs
	* corlib/System.Globalization/CultureTypes.cs
	* corlib/System.Reflection/FieldAttributes.cs
	* corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs
	* corlib/System.Security.Cryptography/CipherMode.cs
	* corlib/System.Security.Cryptography/CspProviderFlags.cs
	* corlib/System.Security.Cryptography/PaddingMode.cs
	* corlib/System.Security.Permissions/IsolatedStorageContainment.cs
	* corlib/System.Security.Permissions/ReflectionPermissionFlag.cs
	* corlib/System.Security.Permissions/SecurityPermissionFlag.cs
	* corlib/System.Security/PolicyLevelType.cs
	* corlib/System.Security/SecurityZone.cs
	* corlib/System/AttributeTargets.cs
	* corlib/System/Environment.cs

	Remove redundant overrides:
	* corlib/System.Reflection.Emit/EnumBuilder.cs
	* corlib/System.Reflection.Emit/TypeBuilder.cs
	* corlib/System/MissingFieldException.cs
	* corlib/System/MissingMemberException.cs
	* corlib/System/MissingMethodException.cs

	Fix visibility and access modifiers:
	* System/System.CodeDom.Compiler/CodeGenerator.cs
	* System/System.Collections.Specialized/NameObjectCollectionBase.cs
	* System/System.Collections.Specialized/NameValueCollection.cs
	* System/System.ComponentModel/EventDescriptor.cs
	* System/System.ComponentModel/EventDescriptorCollection.cs
	* System/System.Diagnostics/ProcessStartInfo.cs
	* System/System.Net/DnsPermission.cs
	* System/System.Net/SocketPermission.cs
	* System/System/Uri.cs
	* corlib/System.IO/StreamReader.cs
	* corlib/System.IO/StringReader.cs
	* corlib/System.IO/StringWriter.cs
	* corlib/System.IO/TextWriter.cs
	* corlib/System.Reflection.Emit/ConstructorBuilder.cs
	* corlib/System.Reflection.Emit/MethodBuilder.cs
	* corlib/System.Reflection.Emit/OpCodes.cs
	* corlib/System.Reflection/Assembly.cs
	* corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs
	* corlib/System.Runtime.Serialization/SerializationException.cs
	* corlib/System/Activator.cs
	* corlib/System/Array.cs
	* corlib/System/Boolean.cs
	* corlib/System/Byte.cs
	* corlib/System/Char.cs
	* corlib/System/DateTime.cs
	* corlib/System/DivideByZeroException.cs
	* corlib/System/Double.cs
	* corlib/System/Int16.cs
	* corlib/System/Int32.cs
	* corlib/System/Int64.cs
	* corlib/System/SByte.cs
	* corlib/System/Single.cs
	* corlib/System/Type.cs
	* corlib/System/UInt16.cs
	* corlib/System/UInt32.cs
	* corlib/System/UInt64.cs

	Fix IDisposable, Dispose() mess
	* corlib/System.IO/BinaryWriter.cs
	* corlib/System.IO/BufferedStream.cs
	* corlib/System.IO/FileStream.cs
	* corlib/System.IO/MemoryStream.cs
	* corlib/System.IO/Stream.cs

svn path=/trunk/mcs/; revision=4416
2002-05-08 13:21:13 +00:00
Paolo Molaro a6d32b8b18 Tue May 7 11:47:46 CEST 2002 Paolo Molaro <[email protected]>
* StreamReader.cs: return the number of chars read even if we diddn't
	fill the whole buffer (makes Sergey's ilasm work with mono).

svn path=/trunk/mcs/; revision=4365
2002-05-07 06:01:18 +00:00
Nick Drochak 4debd2009d 2002-05-05 Nick Drochak <[email protected]>
* StreamReader.cs: Throw exceptions where needed. Changed Null field to
	use new internal class since null cannot be passed to constructor
	anymore. Also, fix a coule of small bugs.

svn path=/trunk/mcs/; revision=4273
2002-05-04 11:18:51 +00:00
Piers Haken 042b6ba652 major cleanup
svn path=/trunk/mcs/; revision=3642
2002-04-05 12:41:07 +00:00
Piers Haken cc63806f23 minor CLS conformance tweaks (visibility, virtual, abstract, sealed, etc...)
svn path=/trunk/mcs/; revision=3568
2002-04-03 06:28:53 +00:00
Piers Haken 610d7923ac added missing [Serializable] attribute
svn path=/trunk/mcs/; revision=3540
2002-04-01 20:22:40 +00:00
Dan Lewis 6de415adc3 2002-03-27 Dan Lewis <[email protected]>
* StreamReader.cs: Implemented ReadLine() and ReadEnd().

svn path=/trunk/mcs/; revision=3395
2002-03-27 12:36:47 +00:00
Mike Kestner aadd814550 2002-03-24 Mike Kestner <[email protected]>
* StreamReader.cs (ReadBuffer): Fix buffer merging bugs.

svn path=/trunk/mcs/; revision=3301
2002-03-24 13:40:26 +00:00
Martin Baulig 552bb40a61 2002-03-23 Martin Baulig <[email protected]>
* StreamReader.cs: Always do buffered reading, use 4k blocks.
	(Read (char[], int, int)): Implemented.
	(DiscardBufferedData): Implemented.

svn path=/trunk/mcs/; revision=3289
2002-03-23 17:02:45 +00:00
Mike Kestner 556f0d7b34 2002-03-21 Mike Kestner <[email protected]>
* ASCIIEncoding.cs : Fix off by one error in Get(Char|Byte)Count.

2002-03-21  Mike Kestner <[email protected]>

	* StreamReader.cs : Fill out, add buffering, and use encoding.

svn path=/trunk/mcs/; revision=3266
2002-03-22 02:09:36 +00:00