Stream.st
branchjv
changeset 17966 8b5df02e171f
parent 17938 e2aad1d7c317
child 17968 c354ab0a9e28
equal deleted inserted replaced
17965:a8a04402986c 17966:8b5df02e171f
   191 chunkSeparator
   191 chunkSeparator
   192     "return the chunk-separation character"
   192     "return the chunk-separation character"
   193 
   193 
   194     ^ ChunkSeparator
   194     ^ ChunkSeparator
   195 ! !
   195 ! !
   196 
       
   197 
       
   198 
   196 
   199 !Stream methodsFor:'accessing'!
   197 !Stream methodsFor:'accessing'!
   200 
   198 
   201 contents
   199 contents
   202     "return the entire contents of the stream.
   200     "return the entire contents of the stream.
  1917 
  1915 
  1918     "Modified: / 15.5.1996 / 17:57:01 / cg"
  1916     "Modified: / 15.5.1996 / 17:57:01 / cg"
  1919     "Created: / 29.5.1998 / 16:57:48 / cg"
  1917     "Created: / 29.5.1998 / 16:57:48 / cg"
  1920 !
  1918 !
  1921 
  1919 
       
  1920 size
       
  1921     "return the number of elements in the streamed collection."
       
  1922 
       
  1923     self subclassResponsibility
       
  1924 
       
  1925     "Created: / 05-08-2012 / 18:38:12 / cg"
       
  1926 !
       
  1927 
  1922 terminalType
  1928 terminalType
  1923     ^ 'dump'
  1929     ^ 'dump'
  1924 ! !
  1930 ! !
  1925 
  1931 
  1926 !Stream methodsFor:'reading'!
  1932 !Stream methodsFor:'reading'!
  2553         
  2559         
  2554 
  2560 
  2555     "Modified: / 19.5.1998 / 17:26:25 / cg"
  2561     "Modified: / 19.5.1998 / 17:26:25 / cg"
  2556 ! !
  2562 ! !
  2557 
  2563 
  2558 
       
  2559 !Stream methodsFor:'testing'!
  2564 !Stream methodsFor:'testing'!
  2560 
  2565 
  2561 atEnd
  2566 atEnd
  2562     "return true if the end of the stream has been reached;
  2567     "return true if the end of the stream has been reached;
  2563      - we do not know here how to do it, it must be redefined in subclass"
  2568      - we do not know here how to do it, it must be redefined in subclass"
  2862      s nextPutAll:#('one' 'two' 'three' 'four' 'five') startingAt:2 to:4.
  2867      s nextPutAll:#('one' 'two' 'three' 'four' 'five') startingAt:2 to:4.
  2863      s contents
  2868      s contents
  2864     "
  2869     "
  2865 
  2870 
  2866     "Modified: 11.7.1996 / 10:00:32 / cg"
  2871     "Modified: 11.7.1996 / 10:00:32 / cg"
       
  2872 !
       
  2873 
       
  2874 nextPutAllLines:aCollectionOfStrings
       
  2875     "put all elements of the argument, aCollection as individual lines
       
  2876      onto the receiver, append a cr (carriage return) after each. 
       
  2877      This is only useful with character streams in textMode,
       
  2878      and only allowed, if the receiver supports writing."
       
  2879 
       
  2880     aCollectionOfStrings do:[:eachLine |
       
  2881         self nextPutLine:eachLine.
       
  2882     ].
       
  2883 
       
  2884     "Modified: / 08-11-1996 / 23:53:41 / cg"
       
  2885     "Created: / 27-07-2012 / 09:26:09 / cg"
  2867 !
  2886 !
  2868 
  2887 
  2869 nextPutAllText:aText
  2888 nextPutAllText:aText
  2870     "normal streams can not handle text/emphasis, so convert aText to the string"
  2889     "normal streams can not handle text/emphasis, so convert aText to the string"
  2871 
  2890 
  3228 ! !
  3247 ! !
  3229 
  3248 
  3230 !Stream class methodsFor:'documentation'!
  3249 !Stream class methodsFor:'documentation'!
  3231 
  3250 
  3232 version
  3251 version
  3233     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.190 2012/04/05 09:58:52 stefan Exp $'
  3252     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.192 2012/08/05 16:38:41 cg Exp $'
  3234 !
  3253 !
  3235 
  3254 
  3236 version_CVS
  3255 version_CVS
  3237     ^ '§Header: /cvs/stx/stx/libbasic/Stream.st,v 1.190 2012/04/05 09:58:52 stefan Exp §'
  3256     ^ '§Header: /cvs/stx/stx/libbasic/Stream.st,v 1.192 2012/08/05 16:38:41 cg Exp §'
  3238 !
  3257 !
  3239 
  3258 
  3240 version_SVN
  3259 version_SVN
  3241     ^ '$Id: Stream.st 10804 2012-04-13 13:18:13Z vranyj1 $'
  3260     ^ '$Id: Stream.st 10844 2012-09-07 16:24:32Z vranyj1 $'
  3242 ! !
  3261 ! !
  3243 
  3262 
  3244 Stream initialize!
  3263 Stream initialize!
  3245 
       
  3246 
       
  3247