--- a/terminals/extensions.st Sun Jan 15 07:13:15 2012 +0000
+++ b/terminals/extensions.st Sun Jan 15 22:27:17 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