Squeak Class Documentation category index | class index  
 
WriteStream
  category: Collections-Streams
  superclass: PositionableStream
  subclasses: TranscriptStream LimitedWriteStream ReadWriteStream TextStream DeflateStream ZipEncoder

I represent an accessor for a sequence of objects that can only store objects in the sequence.

instance methods
  accessing
  contents
next
nextPut:
nextPutAll:
size

  character writing
  cr
crtab
crtab:
ensureASpace
ensureNoSpace
nextPutKeyword:withArg:
peekLast
space
tab
tab:

  file open/close
  flush

  fileIn/Out
  nextChunkPut:
nextChunkPutWithStyle:
timeStamp

  positioning
  position:
reset
resetToStart

  printing
  store:

  private
  braceArray
braceArray:
on:
on:from:to:
pastEndPut:
with:
withAttribute:do:
withAttributes:do:

class methods
  instance creation
  on:from:to:
with:
with:from:to:

instance methods
  accessing top  
 

contents

Answer with a copy of my collection from 1 to readLimit.


 

next

Answer the next object accessible by the receiver.


 

nextPut:

Primitive. Insert the argument at the next position in the Stream
represented by the receiver. Fail if the collection of this stream is not an
Array or a String. Fail if the stream is positioned at its end, or if the
position is out of bounds in the collection. Fail if the argument is not
of the right type for the collection. Optional. See Object documentation
whatIsAPrimitive.


 

nextPutAll:

Append the elements of aCollection to the sequence of objects accessible
by the receiver. Answer aCollection.


 

size

Primitive. Answer the number of indexable variables in the receiver.
This value is the same as the largest legal subscript. Essential. See Object
documentation whatIsAPrimitive.


  character writing top  
 

cr

Append a return character to the receiver.


 

crtab

Append a return character, followed by a single tab character, to the
receiver.


 

crtab:

Append a return character, followed by anInteger tab characters, to the
receiver.


 

ensureASpace

Append a space character to the receiver IFF there is not one on the end.


 

ensureNoSpace

If there is not one on the end, remove it.


 

nextPutKeyword:withArg:

Emit a keyword/value pair in the alternate syntax


 

peekLast

Return that item just put at the end of the stream


 

space

Append a space character to the receiver.


 

tab

Append a tab character to the receiver.


 

tab:

Append anInteger tab characters to the receiver.


  file open/close top  
 

flush

Do nothing by default


  fileIn/Out top  
 

nextChunkPut:

Append the argument, aString, to the receiver, doubling embedded terminators.


 

nextChunkPutWithStyle:

Append the argument, aText, to the receiver, doubling embedded terminators. Put out one chunk for the string and one for the style runs. Mark the style with ]style[.


 

timeStamp

Append the current time to the receiver as a String.


  positioning top  
 

position:

Refer to the comment in PositionableStream|position:.


 

reset

Refer to the comment in PositionableStream|reset.


 

resetToStart


  printing top  
 

store:

Have anObject print on the receiver for purposes of rereading.


  private top  
 

braceArray

This method is used in compilation of brace constructs.
It MUST NOT be deleted or altered.


 

braceArray:

This method is used in compilation of brace constructs.
It MUST NOT be deleted or altered.


 

on:


 

on:from:to:


 

pastEndPut:


 

with:


 

withAttribute:do:

No-op here is overriden in TextStream for font emphasis


 

withAttributes:do:

No-op here is overriden in TextStream for font emphasis


class methods
  instance creation top  
 

on:from:to:

Answer an instance of me on a copy of the argument, aCollection,
determined by the indices firstIndex and lastIndex. Position the instance
at the beginning of the collection.


 

with:

Answer an instance of me on the argument, aCollection, positioned to
store objects at the end of aCollection.


 

with:from:to:

Answer an instance of me on the subcollection of the argument,
aCollection, determined by the indices firstIndex and lastIndex. Position
the instance to store at the end of the subcollection.