Squeak Class Documentation category index | class index  
 
ReadWriteStream
  category: Collections-Streams
  superclass: WriteStream
  subclasses: RWBinaryOrTextStream FileStream Transcripter

I represent an accessor for a sequence of objects. My instances can both read and store objects.

instance methods
  accessing
  contents
name
next
next:

  converting
  asUnZippedStream

  file status
  close
closed

  fileIn/Out
  fileInObjectAndCode
fileNameEndsWith:
fileOutChangeSet:andObject:
fileOutChanges
fileOutClass:andObject:
fileOutClass:andObject:blocking:

  testing
  =
hash
isZipArchive

class methods
  no messages
 

instance methods
  accessing top  
 

contents

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


 

name

Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..


 

next

Primitive. Return the next object 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. Optional. See Object documentation
whatIsAPrimitive.


 

next:

Answer the next anInteger elements of my collection. overriden for efficiency


  converting top  
 

asUnZippedStream

Decompress this file if needed, and return a stream. No file is written. File extension may be .gz or anything else. Also works on archives (.zip, .gZip).


  file status top  
 

close

Presumably sets the status of the receiver to be closed. This message does
nothing at this level, but is included for FileStream compatibility.


 

closed

If you have close (for FileStream compatibility), you must respond to closed. The result in nonsense here. TK 29 May 96


  fileIn/Out top  
 

fileInObjectAndCode

This file may contain:
1) a fileIn of code
2) just an object in SmartReferenceStream format
3) both code and an object.
File it in and return the object. Note that self must be a FileStream or RWBinaryOrTextStream. Maybe ReadWriteStream incorporate RWBinaryOrTextStream?


 

fileNameEndsWith:

See comment in FileStream fileNameEndsWith:


 

fileOutChangeSet:andObject:

Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically.


 

fileOutChanges

Append to the receiver a description of all class changes.


 

fileOutClass:andObject:

Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically.


 

fileOutClass:andObject:blocking:

Write a file that has both the source code for the named class and an object as bits. Any instance-specific object will get its class written automatically. Accept a list of objects to map to nil or some other object (blockers). In addition to teh choices in each class's objectToStoreOnDataStream


  testing top  
 

=

Answer whether the receiver and the argument represent the same
object. If = is redefined in any subclass, consider also redefining the
message hash.


 

hash

Answer a SmallInteger whose value is related to the receiver's identity.
May be overridden, and should be overridden in any classes that define =


 

isZipArchive

Determine if this appears to be a valid Zip archive


class methods
  no messages top