terminals/extensions.sav
changeset 52 a1363827b596
parent 43 b9a077d6ce14
--- a/terminals/extensions.sav	Sun Jan 15 22:49:37 2012 +0000
+++ b/terminals/extensions.sav	Sun Jan 15 22:50:34 2012 +0000
@@ -7,18 +7,25 @@
         ^Xtreams::NullWriteStream new
 ! !
 
-!Xtreams::WriteStream methodsFor:'transforming'!
+!PipeStream methodsFor:'converting'!
+
+reading
+
+    ^Xtreams::ExternalReadStream on: self
+! !
+
+!PipeStream methodsFor:'converting'!
 
-buffering: bufferSize
-	"Delays committing its content to its underlying stream until it has reached a certain size ,#flush is sent, or the stream is closed."
-	"       bufferSize      <Integer> The size of the buffer to start with.
-		^<PositionWriteStream>"
-	"
-		(ByteArray new writing buffering: 5)
-			write: (ByteArray withAll: (1 to: 11));
-			conclusion
-	"
-	^BufferedWriteStream on: self bufferSize: bufferSize
+writing
+
+    ^Xtreams::ExternalWriteStream on: self
+! !
+
+!PipeStream methodsFor:'testing'!
+
+isActive
+
+    ^self isOpen
 ! !
 
 !Block methodsFor:'xtreams'!
@@ -80,24 +87,6 @@
         ^Xtreams::SharedQueueWriteStream on: self
 ! !
 
-!TextCollector methodsFor:'converting'!
-
-writing
-	^[:object | self nextPut: object] writing
-! !
-
-!SequenceableCollection methodsFor:'converting'!
-
-reading
-        ^Xtreams::SequenceableCollectionReadStream on: self
-! !
-
-!SequenceableCollection methodsFor:'converting'!
-
-writing
-        ^Xtreams::SequenceableCollectionWriteStream on: self
-! !
-
 !Filename methodsFor:'converting'!
 
 appending
@@ -125,16 +114,16 @@
     ^(OperatingSystem open: self osNameForAccess attributes: #(O_WRONLY | O_CREAT) mode: nil) writing
 ! !
 
-!Xtreams::Buffer methodsFor:'converting'!
+!SequenceableCollection methodsFor:'converting'!
 
 reading
-	^BufferReadStream on: self
+        ^Xtreams::SequenceableCollectionReadStream on: self
 ! !
 
-!Xtreams::Buffer methodsFor:'converting'!
+!SequenceableCollection methodsFor:'converting'!
 
 writing
-	^BufferWriteStream on: self
+        ^Xtreams::SequenceableCollectionWriteStream on: self
 ! !
 
 !UnixOperatingSystem::FileDescriptorHandle methodsFor:'xtreams'!
@@ -157,6 +146,32 @@
         ^Xtreams::CollectionWriteStream on: self
 ! !
 
+!Xtreams::Buffer methodsFor:'converting'!
+
+reading
+	^BufferReadStream on: self
+! !
+
+!Xtreams::Buffer methodsFor:'converting'!
+
+writing
+	^BufferWriteStream on: self
+! !
+
+!Xtreams::WriteStream methodsFor:'transforming'!
+
+buffering: bufferSize
+	"Delays committing its content to its underlying stream until it has reached a certain size ,#flush is sent, or the stream is closed."
+	"       bufferSize      <Integer> The size of the buffer to start with.
+		^<PositionWriteStream>"
+	"
+		(ByteArray new writing buffering: 5)
+			write: (ByteArray withAll: (1 to: 11));
+			conclusion
+	"
+	^BufferedWriteStream on: self bufferSize: bufferSize
+! !
+
 !Random methodsFor:'converting'!
 
 reading