eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'CharacterWriteStream':

Home

everywhere
www.exept.de
for:
[back]

Class: CharacterWriteStream


Inheritance:

   Object
   |
   +--Stream
      |
      +--PeekableStream
         |
         +--PositionableStream
            |
            +--WriteStream
               |
               +--CharacterWriteStream
                  |
                  +--TextStream

Package:
stx:libbasic
Category:
Streams
Version:
rev: 1.9 date: 2009/10/05 09:20:25
user: cg
file: CharacterWriteStream.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Stefan Vogel (stefan@zwerg)

Description:


This is a WriteStream, which automagically changes the underlying collection,
if a character does fit into the current collection.

String -> Unicode16String -> Unicode32Sting


[instance variables:]

[class variables:]


Related information:

    String
    Unicode16String
    Unicode32Sting

Instance protocol:

private
o  characterSizeChanged: aCharacterOrString
change aCollection to fit the size of aCharacter

private-accessing
o  on: aCollection

o  on: aCollection from: start to: stop

o  with: aCollection

writing
o  next: count put: aCharacter
append anObject count times to the receiver.
Redefined to avoid count grows of the underlying collection -
instead a single grow on the final size is performed.

o  nextPut: aCharacter
append the argument, aCharacter to the stream.
Specially tuned for appending to String, ByteArray and Array streams.

o  nextPutAll: aCollection
append aCollection to the receiver.
Redefined to convert to a string of the needed charcter size.

o  nextPutAll: aCollection startingAt: start to: stop

o  nextPutAllUnicode: aCollection

o  nextPutUnicode: aCharacter


Examples:



    |stream|

    stream := CharacterWriteStream on:(String new:32).
    stream nextPutAll:'abc'.
    stream nextPut:(Character value:16r2c00).
    stream contents inspect


ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 08:34:56 GMT