WriteStream.st
changeset 16201 0b2ca38fc441
parent 15653 197b5c750d10
child 16793 5e482c02db86
--- a/WriteStream.st	Tue Mar 04 15:58:23 2014 +0100
+++ b/WriteStream.st	Tue Mar 04 16:05:28 2014 +0100
@@ -38,8 +38,8 @@
 "
     Streams for writing into.
     WriteStreams are especially useful, if big strings are to be constructed
-    from pieces - create a writeStream, add the pieces (with #nextPut or
-    #nextPutAll) and finally fetch the concatenated string via #contents.
+    from pieces - create a writeStream, add the pieces (with #nextPut: or
+    #nextPutAll:) and finally fetch the concatenated string via #contents.
     This is much better than constructing the big string by concatenating via
     the comma (,) operator, since less intermediate garbage objects are created.
 
@@ -141,10 +141,7 @@
 last
     "return the last element - report an error if the stream is empty"
 
-    |position1Based|
-
-    position1Based := position + 1.
-    ^ collection at:(position1Based - 1).
+    ^ collection at:position.
 
     "
      |s|
@@ -253,23 +250,6 @@
 
 !WriteStream methodsFor:'queries'!
 
-isReadable 
-    "return true if the receiver supports reading - thats not true"
-
-    ^ false
-
-    "Created: / 8.11.1997 / 14:06:07 / cg"
-!
-
-isWritable
-    "return true, if writing is supported by the recevier.
-     Always return true here"
-
-    ^ true
-
-    "Modified: 16.5.1996 / 14:44:49 / cg"
-!
-
 size
     "return the current size"
 
@@ -298,6 +278,23 @@
     ^ self position == 0
 
     "Created: 14.10.1997 / 20:44:37 / cg"
+!
+
+isReadable 
+    "return true if the receiver supports reading - thats not true"
+
+    ^ false
+
+    "Created: / 8.11.1997 / 14:06:07 / cg"
+!
+
+isWritable
+    "return true, if writing is supported by the recevier.
+     Always return true here"
+
+    ^ true
+
+    "Modified: 16.5.1996 / 14:44:49 / cg"
 ! !
 
 !WriteStream methodsFor:'writing'!
@@ -663,10 +660,10 @@
 !WriteStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.82 2013-08-20 13:45:48 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.83 2014-03-04 15:05:28 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.82 2013-08-20 13:45:48 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/WriteStream.st,v 1.83 2014-03-04 15:05:28 stefan Exp $'
 ! !