ReadWriteStream.st
changeset 9004 e24e9f8fcca1
parent 8614 88421fbd4ab6
child 9285 94801c9b5d2b
--- a/ReadWriteStream.st	Mon Nov 28 22:24:02 2005 +0100
+++ b/ReadWriteStream.st	Mon Nov 28 22:59:59 2005 +0100
@@ -158,10 +158,16 @@
     "return true if the receiver supports reading - thats true"
 
     ^ true
+!
+
+size
+    "return the number of elements in the streamed collection."
+
+    ^ (readLimit ? 0) max:position-ZeroPosition.
 ! !
 
 !ReadWriteStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadWriteStream.st,v 1.25 2004-10-01 07:36:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadWriteStream.st,v 1.26 2005-11-28 21:59:59 stefan Exp $'
 ! !