Stream.st
changeset 14593 e94f975fd01b
parent 14434 82419864bb2a
child 14792 3a8ef902a219
child 18011 deb0c3355881
equal deleted inserted replaced
14592:cd1a3cff5d1c 14593:e94f975fd01b
   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 
   196 
   198 !Stream methodsFor:'accessing'!
   197 !Stream methodsFor:'accessing'!
   199 
   198 
   200 contents
   199 contents
   201     "return the entire contents of the stream.
   200     "return the entire contents of the stream.
  1717 !
  1716 !
  1718 
  1717 
  1719 nextPutUtf8:aCharacter
  1718 nextPutUtf8:aCharacter
  1720     "append my UTF-8 representation to the argument, aStream.
  1719     "append my UTF-8 representation to the argument, aStream.
  1721      Up to 31 bits can be encoded in up to 6 bytes.
  1720      Up to 31 bits can be encoded in up to 6 bytes.
  1722      However, currently, characters are limited to 16 bits."
  1721      However, currently, characters are limited to 31 bits."
  1723 
  1722 
  1724     |codePoint b1 b2 b3 b4 b5 v|
  1723     |codePoint b1 b2 b3 b4 b5 v|
  1725 
  1724 
  1726     codePoint := aCharacter codePoint.
  1725     codePoint := aCharacter codePoint.
  1727 
  1726 
  1773       (String streamContents:[:s| 
  1772       (String streamContents:[:s| 
  1774             s nextPutUtf8:$a.
  1773             s nextPutUtf8:$a.
  1775             s nextPutUtf8:$ü.
  1774             s nextPutUtf8:$ü.
  1776             s nextPutUtf8: (Character value:16r1fff).
  1775             s nextPutUtf8: (Character value:16r1fff).
  1777             s nextPutUtf8: (Character value:16rffff).
  1776             s nextPutUtf8: (Character value:16rffff).
       
  1777             s nextPutUtf8: (Character value:16r1ffffff).
  1778             s nextPutUtf8: (Character value:16r800).
  1778             s nextPutUtf8: (Character value:16r800).
  1779       ])
  1779       ])
  1780             asByteArray
  1780             asByteArray
  1781             
  1781             
  1782     "
  1782     "
  3282 ! !
  3282 ! !
  3283 
  3283 
  3284 !Stream class methodsFor:'documentation'!
  3284 !Stream class methodsFor:'documentation'!
  3285 
  3285 
  3286 version
  3286 version
  3287     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.195 2012-10-25 22:19:33 cg Exp $'
  3287     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.196 2012-12-14 10:13:32 stefan Exp $'
  3288 !
  3288 !
  3289 
  3289 
  3290 version_CVS
  3290 version_CVS
  3291     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.195 2012-10-25 22:19:33 cg Exp $'
  3291     ^ '$Header: /cvs/stx/stx/libbasic/Stream.st,v 1.196 2012-12-14 10:13:32 stefan Exp $'
  3292 ! !
  3292 ! !
  3293 
  3293 
  3294 Stream initialize!
  3294 Stream initialize!