#BUGFIX by cg
class: Stream
inst side (for TextCollector)
added: #bufferSizeForBulkCopy
changed:
#copy:into:
#copyToEndInto:
class: Stream class
removed: #bufferSizeForBulkCopy
--- a/Stream.st Wed Mar 13 23:35:39 2019 +0100
+++ b/Stream.st Thu Mar 14 00:23:26 2019 +0100
@@ -216,18 +216,6 @@
^ ChunkSeparator
! !
-!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'!
isAbstract
@@ -396,6 +384,18 @@
^ self
! !
+!Stream 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 methodsFor:'emphasis'!
bold
@@ -3674,9 +3674,10 @@
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:(outStream class bufferSizeForBulkCopy)
+ ^ self copy:numberOfElementsOrNil into:outStream bufferSize:(outStream bufferSizeForBulkCopy)
"Modified: / 13-03-2019 / 23:06:37 / Stefan Vogel"
+ "Modified: / 14-03-2019 / 00:22:39 / Claus Gittinger"
!
copy:numberOfElementsOrNil into:aWriteStream bufferSize:bufferSizeArg
@@ -3774,7 +3775,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:(outStream class bufferSizeForBulkCopy)
+ ^ self copy:nil into:outStream bufferSize:(outStream bufferSizeForBulkCopy)
"/ data rate to USB2.0 stick (Win32):
"/ 120 KB/s 8Kb SingleBuffer
@@ -3797,6 +3798,7 @@
"/
"Modified: / 13-03-2019 / 23:06:44 / Stefan Vogel"
+ "Modified: / 14-03-2019 / 00:22:44 / Claus Gittinger"
!
copyToEndInto:outStream bufferSize:bufferSize