Stream.st
changeset 11745 82af78b9c252
parent 11693 ccc2aa0c962d
child 11750 d588fc627354
equal deleted inserted replaced
11744:c15b974b69a1 11745:82af78b9c252
   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 
   196 
   197 
   197 !Stream methodsFor:'accessing'!
   198 !Stream methodsFor:'accessing'!
   198 
   199 
   199 contents
   200 contents
   200     "return the entire contents of the stream.
   201     "return the entire contents of the stream.
   636       ('/tmp/mist' asFilename readStream binary; yourself) copyToEndInto:#[] writeStream
   637       ('/tmp/mist' asFilename readStream binary; yourself) copyToEndInto:#[] writeStream
   637       #[1 2 3 4 5 6 7] readStream copyToEndInto:'/tmp/mist' asFilename writeStream.
   638       #[1 2 3 4 5 6 7] readStream copyToEndInto:'/tmp/mist' asFilename writeStream.
   638       #[1 2 3 4 5 6 7] readStream copyToEndInto:'' writeStream.
   639       #[1 2 3 4 5 6 7] readStream copyToEndInto:'' writeStream.
   639 
   640 
   640     "
   641     "
       
   642 !
       
   643 
       
   644 copyToEndFrom:inStream
       
   645     "read from inStream, and write all data up to the end to the receiver.
       
   646      Return the number of bytes which have been transferred.
       
   647      Same functionality as copyToEnd:, but reversed arg and receiver
       
   648      (useful in a cascade message of the writeStream)"
       
   649 
       
   650     ^ inStream copyToEndInto:self
   641 !
   651 !
   642 
   652 
   643 copyToEndInto:outStream
   653 copyToEndInto:outStream
   644     "read from the receiver, and write all data up to the end to another stream.
   654     "read from the receiver, and write all data up to the end to another stream.
   645      Return the number of bytes which have been transferred"
   655      Return the number of bytes which have been transferred"
  2923 ! !
  2933 ! !
  2924 
  2934 
  2925 !Stream class methodsFor:'documentation'!
  2935 !Stream class methodsFor:'documentation'!
  2926 
  2936 
  2927 version
  2937 version
  2928     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.166 2009-05-13 09:07:55 cg Exp $'
  2938     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.167 2009-06-06 11:38:11 cg Exp $'
  2929 ! !
  2939 ! !
  2930 
  2940 
  2931 Stream initialize!
  2941 Stream initialize!