#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Wed, 22 Feb 2017 11:15:28 +0100
changeset 21521 3766ddd131dc
parent 21520 808c4175a149
child 21522 c4fe9f268c0b
#FEATURE by cg class: EncodedStream added: #collection
EncodedStream.st
--- a/EncodedStream.st	Wed Feb 22 10:56:46 2017 +0100
+++ b/EncodedStream.st	Wed Feb 22 11:15:28 2017 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2004 by eXept Software AG
               All Rights Reserved
@@ -55,7 +53,7 @@
     "
      |s|
      s := EncodedStream stream:Transcript encoder:(CharacterEncoder encoderToEncodeFrom:#utf8 into:#unicode).
-     s nextPutAll:('öäü' utf8Encoded)
+     s nextPutAll:('öäü' utf8Encoded)
     "
 !
 
@@ -66,7 +64,7 @@
      |baseStream s|
      baseStream := '' readWriteStream.
      s := EncodedStream stream:baseStream encoding:#utf8.
-     s nextPutAll:'öäü'.
+     s nextPutAll:'öäü'.
      baseStream reset; contents.
     "
 ! !
@@ -226,6 +224,14 @@
     stream close
 !
 
+collection
+    "return the underlying container; nil, if there is none (eg. external streams)"
+    
+    ^ stream collection
+
+    "Created: / 22-02-2017 / 11:15:00 / cg"
+!
+
 contents
 
     ^String streamContents: [:s|