Stream.st
changeset 20198 6cc9a9362079
parent 20189 86b76f9d7c7a
child 20206 51652e7f46dd
child 20242 92d211a6151f
--- a/Stream.st	Mon Aug 01 15:33:25 2016 +0200
+++ b/Stream.st	Mon Aug 01 16:27:21 2016 +0200
@@ -70,7 +70,7 @@
                                                 if nil (the default), the signal
                                                 is raised, but if there is no handler,
                                                 nil is returned.
-        
+
     [Class variables / Exceptions:]
         StreamError             <Exception>     parent of all stream errors
 
@@ -90,13 +90,13 @@
         decisions. The biggest problem is the distinction between readable and writeable streams based on inheritance,
         instead of by either using state (i.e. a flag) or delegation.
         The problem is that there are streams which can be both, and maybe even dynamically change their opinion,
-        on whether being readable/writable. 
+        on whether being readable/writable.
         (For example, a buffer may be write-only while filled, but become readonly, when given to a consumer.)
 
         The above decision to base this on inheritance lead to the ugly ReadStream - WriteStream - ReadWriteStream
         hierarchy, with some subclasses undoing the blocking of their superclass.
 
-        Classes named 'ReadStream', 'WriteStream', 'ReadWriteStream', 'PeekableStream' and 'PositionableStream' should 
+        Classes named 'ReadStream', 'WriteStream', 'ReadWriteStream', 'PeekableStream' and 'PositionableStream' should
         all be eliminated in favour of a few flags in the 'Stream' superclass.
 
         It is really time for a new stream hierarchy (XStreams, for example).
@@ -3372,9 +3372,9 @@
 !
 
 throughElementForWhich:aBlock
-    "read elements until aBlock returns true for an element. 
+    "read elements until aBlock returns true for an element.
      Return the collected elements including that element.
-     Leave the stream positioned for the next read to return the element after that one."                                                             
+     Leave the stream positioned for the next read to return the element after that one."
 
     |answerStream element|
 
@@ -3584,17 +3584,17 @@
 !
 
 upToElementForWhich:aBlock
-    "read elements until aBlock returns true for an element. 
+    "read elements until aBlock returns true for an element.
      Return the collected elements excluding that element.
      Leave the stream positioned for the next read to return that element.
-     If no element matches, all elements up to the end are returned"                                                             
+     If no element matches, all elements up to the end are returned"
 
     |answerStream next|
 
     answerStream := WriteStream on:(self contentsSpecies new).
 
     [
-        self atEnd 
+        self atEnd
         or:[ (aBlock value: (next := self peek)) ]
     ] whileFalse:[
         answerStream nextPut:next.