#BUGFIX by stefan
authorStefan Vogel <sv@exept.de>
Wed, 13 Mar 2019 23:32:39 +0100
changeset 23909 a1bbaab07fe1
parent 23908 a6810b64f5d2
child 23910 699cc5ac7036
#BUGFIX by stefan class: Stream changed: #copy:into: #copyToEndInto: class: Stream class comment/format in: #bufferSizeForBulkCopy The writeStream determins the bufferSize
Stream.st
--- a/Stream.st	Wed Mar 13 22:27:42 2019 +0100
+++ b/Stream.st	Wed Mar 13 23:32:39 2019 +0100
@@ -219,9 +219,13 @@
 !Stream class methodsFor:'defaults'!
 
 bufferSizeForBulkCopy
+    "return the size of buffer used when copying big files/bulk data 
+     from one stream to another."
+
     ^ 128 * 1024
 
     "Created: / 13-03-2019 / 16:50:04 / Stefan Vogel"
+    "Modified (comment): / 13-03-2019 / 23:21:13 / Stefan Vogel"
 ! !
 
 !Stream class methodsFor:'testing'!
@@ -3670,9 +3674,9 @@
      Return the number of elements which have been transferred.
      If numberOfElementsOrNil is nil, copy until the end of myself."
 
-    ^ self copy:numberOfElementsOrNil into:outStream bufferSize:(self class bufferSizeForBulkCopy)
-
-    "Modified (comment): / 13-03-2019 / 17:03:47 / Stefan Vogel"
+    ^ self copy:numberOfElementsOrNil into:outStream bufferSize:(outStream class bufferSizeForBulkCopy)
+
+    "Modified: / 13-03-2019 / 23:06:37 / Stefan Vogel"
 !
 
 copy:numberOfElementsOrNil into:aWriteStream bufferSize:bufferSizeArg
@@ -3770,7 +3774,7 @@
     "read from the receiver, and write all elements up to the end to outStream, a WriteStream.
      Return the number of elements which have been transferred"
 
-    ^ self copy:nil into:outStream bufferSize:(self class bufferSizeForBulkCopy)
+    ^ self copy:nil into:outStream bufferSize:(outStream class bufferSizeForBulkCopy)
 
 "/ data rate to USB2.0 stick (Win32):
 "/   120 KB/s       8Kb SingleBuffer
@@ -3792,7 +3796,7 @@
 "/^ retVal.
 "/
 
-    "Modified (comment): / 13-03-2019 / 17:03:04 / Stefan Vogel"
+    "Modified: / 13-03-2019 / 23:06:44 / Stefan Vogel"
 !
 
 copyToEndInto:outStream bufferSize:bufferSize