Nile-Clients

NSAbstractDataStream
A NSAbstractDataStream is xxxxxxxxx.
Instance Variables
basePos: <Object>
byteStream: <Object>
topCall: <Object>
basePos
- xxxxx
byteStream
- xxxxx
topCall
- xxxxx
atEnd
Answer true if the stream is at the end.
beginInstance:size:
This is for use by storeDataOn: methods.
Cf. Object>>storeDataOn:.
beginReference:
We're starting to read anObject. Remember it and its reference
position (if we care; ReferenceStream cares). Answer the
reference position.
byteStream
close
Disassociate a stream from its backing store. Does nothing by default. Streams over files for example will have to close the file in this method.
closed
contents
example
exampleWithPictures
fileNamed:
flush
Guarantee that any writes to me are actually recorded on disk. -- 11/17/92 jhm
getCurrentReference
PRIVATE -- Return the currentReference posn.
Overridden by ReferenceStream.
initialize
Subclasses should redefine this method to perform initializations on instance creation
maybeBeginReference:
See if need to record a reference. In case in the file twice
new
newFileNamed:
next
Answer the next object in the stream.
next:
Answer an Array of the next anInteger objects in the stream.
nextAndClose
Speedy way to grab one object. Only use when we are inside an object binary file. Do not use for the start of a SmartRefStream mixed code-and-object file.
nextPut:
Write anObject to the receiver stream. Answer anObject.
noteCurrentReference:
PRIVATE -- If we support references for type typeID, remember
the current byteStream position so we can add the next object to
the 'objects' dictionary, and return true. Else return false.
This method is here to be overridden by ReferenceStream
objectAt:
PRIVATE -- Read & return the object at a given stream position. 08:18 tk anInteger is a relative file position.
objectIfBlocked:
See if this object is blocked -- not written out and another object substituted.
oldFileNamed:
on:
project
Return the project we are writing or nil
replace:with:
We may wish to remember that in some field, the original object is being replaced by the proxy. For the hybred scheme that collects with a DummyStream and writes an ImageSegment, it needs to hold onto the originals so they will appear in outPointers, and be replaced.
rootObject
Return the object at the root of the tree we are filing out.
rootObject:
Return the object at the root of the tree we are filing out.
setCurrentReference:
PRIVATE -- Set currentReference to refPosn.
Noop here. Cf. ReferenceStream.
setStream:
PRIVATE -- Initialization method.
setStream:reading:
PRIVATE -- Initialization method.
streamedRepresentationOf:
testWith:
tryToPutReference:typeID:
PRIVATE -- If we support references for type typeID, and if
anObject already appears in my output stream, then put a
reference to the place where anObject already appears. If we
support references for typeID but didn't already put anObject,
then associate the current stream position with anObject in
case one wants to nextPut: it again.
Return true after putting a reference; false if the object still
needs to be put.
For DataStream this is trivial. ReferenceStream overrides this.
typeIDFor:
Return the typeID for anObject's class. This is where the tangle of objects is clipped to stop everything from going out.
Classes can control their instance variables by defining objectToStoreOnDataStream.
Any object in blockers is not written out. See ReferenceStream.objectIfBlocked: and DataStream nextPut:.
Morphs do not write their owners. See Morph.storeDataOn: Each morph tells itself to 'prepareToBeSaved' before writing out.
unStream:
NSAbstractDeflateStream
A NSAbstractDeflateStream is xxxxxxxxx.
Instance Variables
blockPosition: <Object>
blockStart: <Object>
collection: <Object>
hashHead: <Object>
hashTail: <Object>
hashValue: <Object>
position: <Object>
readLimit: <Object>
writeLimit: <Object>
blockPosition
- xxxxx
blockStart
- xxxxx
collection
- xxxxx
hashHead
- xxxxx
hashTail
- xxxxx
hashValue
- xxxxx
position
- xxxxx
readLimit
- xxxxx
writeLimit
- xxxxx
blockPosition
blockPosition:
blockStart
blockStart:
close
Disassociate a stream from its backing store. Does nothing by default. Streams over files for example will have to close the file in this method.
collection
encodeLiteral:
encodeMatch:distance:
Encode the given match of length length starting at dist bytes ahead
flush
Force compression
flushBlock
Flush a deflated block
goodMatchLength
Return the length that is considered to be a 'good' match.
Higher values will result in better compression but take more time.
hashChainLength
Return the max. number of hash chains to traverse.
Higher values will result in better compression but take more time.
hashHead
hashMask
hashShift
hashTail
hashValue
hashValue:
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeHashTables
maxDistance
maxMatch
minMatch
moveContentsToFront
Move the contents of the receiver to the front
next:put:
Make anObject be the next anInteger number of objects accessible by the
receiver. Answer anObject.
next:putAll:startingAt:
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:
on:
pastEndPut:
position
Answer the current position of accessing the sequence of objects.
print:
Asks the object to print itself on the receiver.
setPosition:
Required accessor to a variable. No need to check anything here because the check is done in #position:.
size
Returns an integer indicating the number of elements we can position into.
updateHashTable:delta:
windowMask
writeLimit
NSAbstractInflateStream
A NSAbstractInflateStream is xxxxxxxxx.
Instance Variables
bitBuf: <Object>
bitPos: <Object>
collection: <Object>
crc: <Object>
distTable: <Object>
litTable: <Object>
position: <Object>
readLimit: <Object>
source: <Object>
sourceLimit: <Object>
sourcePos: <Object>
sourceStream: <Object>
state: <Object>
bitBuf
- xxxxx
bitPos
- xxxxx
collection
- xxxxx
crc
- xxxxx
distTable
- xxxxx
litTable
- xxxxx
position
- xxxxx
readLimit
- xxxxx
source
- xxxxx
sourceLimit
- xxxxx
sourcePos
- xxxxx
sourceStream
- xxxxx
state
- xxxxx
atEnd
Returns a boolean indicating whether the receiver is at the end of its values (no more entry to read).
bitBuf
bitBuf:
bitBuff
bitBuff:
bitPos
bitPos:
blockProceedBit
collection
collection:
crcError:
decompressAll
Profile the decompression speed
distTable
distTable:
distanceMap
fixedDistTable
fixedLitTable
getFirstBuffer
Get the first source buffer after initialization has been done
getNextBlock
initialize
Subclasses should redefine this method to perform initializations on instance creation
litTable
litTable:
literalLengthMap
maxBits
moveContentsToFront
Move the decoded contents of the receiver to the front so that we have enough space for decoding more data.
moveSourceToFront
Move the encoded contents of the receiver to the front so that we have enough space for decoding more data.
next:
Reads the next amount objects in the stream and returns a collection containing them in the same order.
nextBits:
on:
on:from:to:
outputCollectionClass
This method must return a Collection class. This class will be used to return collection of elements when #next: or #upTo: are sent. In fact, any kind of class which answers to #newFrom: can be used as soon as #newFrom: accepts a collection as a parameter.
pastEndRead
A client has attempted to read beyond the read limit.
Check in what state we currently are and perform
the appropriate action
position
position:
profile
Profile the decompression speed
readLimit
readLimit:
reset
Resets the position of the receiver to be at the start of the stream.
setPosition:
source
source:
sourceLimit
sourceLimit:
sourcePos
sourcePos:
sourceStream
sourceStream:
state
state:
stateNewBlock
stateNoMoreData
updateCrc:from:to:in:
Answer an updated CRC for the range of bytes in aCollection.
Subclasses can implement the appropriate means for the check sum they wish to use.
verifyCrc
Verify the crc checksum in the input
NSAbstractZipWriteStream
A NSAbstractZipWriteStream is xxxxxxxxx.
Instance Variables
bytesWritten: <Object>
crc: <Object>
crcPosition: <Object>
distanceFreq: <Object>
distances: <Object>
encoder: <Object>
litCount: <Object>
literalFreq: <Object>
literals: <Object>
matchCount: <Object>
bytesWritten
- xxxxx
crc
- xxxxx
crcPosition
- xxxxx
distanceFreq
- xxxxx
distances
- xxxxx
encoder
- xxxxx
litCount
- xxxxx
literalFreq
- xxxxx
literals
- xxxxx
matchCount
- xxxxx
close
Disassociate a stream from its backing store. Does nothing by default. Streams over files for example will have to close the file in this method.
crc
dynamicBlockSizeFor:and:using:and:
Compute the length for the current block using dynamic huffman trees
encodeLiteral:
Encode the given literal
encodeMatch:distance:
Encode the given match of length length starting at dist bytes ahead
encodedStream
finish
Finish pending operation. Do not close output stream.
fixedBlockSizeFor:and:
Compute the length for the current block using fixed huffman trees
flushBlock
Flush a deflated block
flushBlock:
Send the current block
forcedMethod
Return a symbol describing an enforced method or nil if the method should
be chosen adaptively. Valid symbols are
#stored - store blocks (do not compress)
#fixed - use fixed huffman trees
#dynamic - use dynamic huffman trees.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeNewBlock
Initialize the encoder for a new block of data
moveContentsToFront
Need to update crc here
on:
release
We're done with compression. Do some cleanup.
scanBitLength:repeatCount:into:
Update the frequency for the aTree based on the given values
scanBitLengths:into:
Scan the trees and determine the frequency of the bit lengths.
For repeating codes, emit a repeat count.
sendBitLength:repeatCount:tree:
Send the given bitLength, repeating repeatCount times
sendBitLength:tree:
Send the given bitLength
sendBitLengthTree:
Send the bit length tree
sendCompressedBlock:with:
Send the current block using the encodings from the given literal/length and distance tree
sendDynamicBlock:literalTree:distanceTree:bitLengths:
Send a block using dynamic huffman trees
sendFixedBlock
Send a block using fixed huffman trees
sendLiteralTree:distanceTree:using:bitLengths:
Send all the trees needed for dynamic huffman tree encoding
sendStoredBlock
Send an uncompressed block
shouldFlush
Check if we should flush the current block.
Flushing can be useful if the input characteristics change.
storedBlockSize
Compute the length for the current block when stored as is
updateCrc
updateCrc:from:to:in:
writeFooter
writeHeader
NSBuffer
I'm used to bufferize any kind of input stream. With me, there is no need for each stream to implement its own buffer. Just chain your slow stream with me and you will get a fast stream.
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
initialize
Subclasses should redefine this method to perform initializations on instance creation
inputStream:
NSBufferTest
A NSBufferTest is xxxxxxxxx.
Instance Variables
testEmpty
testNeverSendsNext
This test ensures that the buffer always perform optimized calls to the input stream. The mock throws an error if the buffer sends #next or #peek.
testNexts
testNexts2
testSimple
NSColoredCodeStream
A NSColoredCodeStream is xxxxxxxxx.
Instance Variables
colorTable: <Object>
dialect: <Object>
colorTable
- xxxxx
dialect
- xxxxx
colorTable
Answer the table to use to determine colors
contents:
initialize
Subclasses should redefine this method to perform initializations on instance creation
withColor:emphasis:do:
Evaluate the given block with the given color and style text attribute
withStyleFor:do:
Evaluate aBlock with appropriate emphasis and color for the given elementType
NSColoredCodeStreamTest
A NSColoredCodeStreamTest is xxxxxxxxx.
Instance Variables
testOn
NSCompositionStream
A NSCompositionStream is xxxxxxxxx.
Instance Variables
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
inputStreams:
NSCompositionStreamTest
A NSCompositionStreamTest is xxxxxxxxx.
Instance Variables
testCompose1
testCompose2
testComposeEmpty
NSCompressedSourceStream
A NSCompressedSourceStream is xxxxxxxxx.
Instance Variables
collection: <Object>
dirty: <Object>
endOfFile: <Object>
nSegments: <Object>
position: <Object>
readLimit: <Object>
segmentFile: <Object>
segmentIndex: <Object>
segmentSize: <Object>
segmentTable: <Object>
writeLimit: <Object>
collection
- xxxxx
dirty
- xxxxx
endOfFile
- xxxxx
nSegments
- xxxxx
position
- xxxxx
readLimit
- xxxxx
segmentFile
- xxxxx
segmentIndex
- xxxxx
segmentSize
- xxxxx
segmentTable
- xxxxx
writeLimit
- xxxxx
atEnd
Answers true if and only if there is no more element to read.
close
Disassociate a stream from its backing store. Does nothing by default. Streams over files for example will have to close the file in this method.
contents
Answer with a copy of my collection from 1 to readLimit.
contentsOfEntireFile
fileID
Only needed for OSProcess stuff
firstSegmentLoc
First segment follows 3 header words and segment table
flush
Ensure the backing store is updated. Default implementation does nothing.
next
Reads the next object in the stream and returns it. Please ensure that the stream is not at its end before calling #next. Behavior is not defined if the stream is at its end.
next:
Reads the next amount objects in the stream and returns a collection containing them in the same order.
nextPut:
Appends anObject to the receiver's past sequence values. If the receiver's future sequence values is not empty, removes its first object. Returns anObject.
nextPutAll:
Enumerates the argument, adding each element to the receiver. Returns aCollection.
on:
openOn:
Open the receiver.
openReadOnly
outputCollectionClass
This method must return a Collection class. This class will be used to return collection of elements when #next: or #upTo: are sent. In fact, any kind of class which answers to #newFrom: can be used as soon as #newFrom: accepts a collection as a parameter.
peek
Returns the next object in the receiver's future sequence values without advancing the receiver's position. Returns nil if the receiver is at end of stream.
position
position:
Sets the number of element before the position to be the parameter newPosition. 0 for the start of the stream. Throws an error if the parameter is lesser than 0 or greater than the size.
readHeaderInfo
readOnlyCopy
segmentOffset
segmentSize:maxSize:
Note that this method can be called after the initial open, provided that no
writing has yet taken place. This is how to override the default segmentation.
setPosition:
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.
test
FileDirectory default deleteFileNamed: 'test.stc'.
(CompressedSourceStream on: (FileStream newFileNamed: 'test.stc')) fileOutChanges
writeSegment
The current segment must be the last in the file.
NSCompressedSourceStreamTest
A NSCompressedSourceStreamTest is xxxxxxxxx.
Instance Variables
fileNameForNonEmpty: <Object>
fileNameForStream: <Object>
nonEmpty: <Object>
stream: <Object>
fileNameForNonEmpty
- xxxxx
fileNameForStream
- xxxxx
nonEmpty
- xxxxx
stream
- xxxxx
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
nonEmptyStream
setUp
stream
Returns any stream.
tearDown
We delete files generated by the tests
testGlobal
NSDataStream
A NSDataStream is xxxxxxxxx.
Instance Variables
beginInstance:size:
This is for use by storeDataOn: methods.
Cf. Object>>storeDataOn:.
beginReference:
We're starting to read anObject. Remember it and its reference
position (if we care; ReferenceStream cares). Answer the
reference position.
getCurrentReference
PRIVATE -- Return the currentReference posn.
Overridden by ReferenceStream.
maybeBeginReference:
Do nothing. See ReferenceStream|maybeBeginReference:
noteCurrentReference:
PRIVATE -- If we support references for type typeID, remember
the current byteStream position so we can add the next object to
the 'objects' dictionary, and return true. Else return false.
This method is here to be overridden by ReferenceStream
objectAt:
PRIVATE -- Read & return the object at a given stream position. 08:18 tk anInteger is a relative file position.
objectIfBlocked:
We don't do any blocking
project
Return the project we are writing or nil
replace:with:
We may wish to remember that in some field, the original object is being replaced by the proxy. For the hybred scheme that collects with a DummyStream and writes an ImageSegment, it needs to hold onto the originals so they will appear in outPointers, and be replaced.
setCurrentReference:
PRIVATE -- Set currentReference to refPosn.
Noop here. Cf. ReferenceStream.
tryToPutReference:typeID:
PRIVATE -- If we support references for type typeID, and if
anObject already appears in my output stream, then put a
reference to the place where anObject already appears. If we
support references for typeID but didn't already put anObject,
then associate the current stream position with anObject in
case one wants to nextPut: it again.
Return true after putting a reference; false if the object still
needs to be put.
For DataStream this is trivial. ReferenceStream overrides this.
NSDataStreamTest
A NSDataStreamTest is xxxxxxxxx.
Instance Variables
nonEmpty: <Object>
stream: <Object>
nonEmpty
- xxxxx
stream
- xxxxx
classToBeTested
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
example
An example and test of DataStream/ReferenceStream.
11/19/92 jhm: Use self testWith:.
exampleWithPictures
DataStream exampleWithPictures
nonEmptyStream
Must return non-empty stream positioned at its begining.
serializedArray
setUp
stream
Returns any stream.
testCompactRectangleContents
self debug: #testCompactRectangleContents
testFalseContents
self debug: #testFalseContents
testGlobal
testLargeRectangleContents
self debug: #testLargeRectangleContents
testNextCompactRectangle
self debug: #testNextCompactRectangle
testNextLargeRectangle
self debug: #testNextCompactRectangle
testNextRectangle
self debug: #testNextRectangle
testNilContents
self debug: #testNilContents
testPutAndReadABoolean
self debug: #testPutAndReadABoolean
testPutAndReadAString
self debug: #testPutAndReadAString
testRectangleContents
self debug: #testRectangleContents
testSerialized
self debug: #testSerialized
testTrueContents
self debug: #testTrueContents
NSDecoderAbstractZipWriteStream
A NSDecoderAbstractZipWriteStream is xxxxxxxxx.
Instance Variables
bytesWritten: <Object>
crc: <Object>
crcPosition: <Object>
distanceFreq: <Object>
distances: <Object>
encoder: <Object>
litCount: <Object>
literalFreq: <Object>
literals: <Object>
matchCount: <Object>
bytesWritten
- xxxxx
crc
- xxxxx
crcPosition
- xxxxx
distanceFreq
- xxxxx
distances
- xxxxx
encoder
- xxxxx
litCount
- xxxxx
literalFreq
- xxxxx
literals
- xxxxx
matchCount
- xxxxx
close
Disassociate a stream from its backing store. Does nothing by default. Streams over files for example will have to close the file in this method.
crc
dynamicBlockSizeFor:and:using:and:
Compute the length for the current block using dynamic huffman trees
encodeLiteral:
Encode the given literal
encodeMatch:distance:
Encode the given match of length length starting at dist bytes ahead
encodedStream
finish
Finish pending operation. Do not close output stream.
fixedBlockSizeFor:and:
Compute the length for the current block using fixed huffman trees
flushBlock
Flush a deflated block
flushBlock:
Send the current block
forcedMethod
Return a symbol describing an enforced method or nil if the method should
be chosen adaptively. Valid symbols are
#stored - store blocks (do not compress)
#fixed - use fixed huffman trees
#dynamic - use dynamic huffman trees.
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeNewBlock
Initialize the encoder for a new block of data
moveContentsToFront
Need to update crc here
on:
release
We're done with compression. Do some cleanup.
scanBitLength:repeatCount:into:
Update the frequency for the aTree based on the given values
scanBitLengths:into:
Scan the trees and determine the frequency of the bit lengths.
For repeating codes, emit a repeat count.
sendBitLength:repeatCount:tree:
Send the given bitLength, repeating repeatCount times
sendBitLength:tree:
Send the given bitLength
sendBitLengthTree:
Send the bit length tree
sendCompressedBlock:with:
Send the current block using the encodings from the given literal/length and distance tree
sendDynamicBlock:literalTree:distanceTree:bitLengths:
Send a block using dynamic huffman trees
sendFixedBlock
Send a block using fixed huffman trees
sendLiteralTree:distanceTree:using:bitLengths:
Send all the trees needed for dynamic huffman tree encoding
sendStoredBlock
Send an uncompressed block
shouldFlush
Check if we should flush the current block.
Flushing can be useful if the input characteristics change.
storedBlockSize
Compute the length for the current block when stored as is
updateCrc
updateCrc:from:to:in:
writeFooter
writeHeader
NSDecoderDeflateStream
A NSDecoderDeflateStream is xxxxxxxxx.
Instance Variables
blockPosition: <Object>
blockStart: <Object>
collection: <Object>
hashHead: <Object>
hashTail: <Object>
hashValue: <Object>
position: <Object>
readLimit: <Object>
writeLimit: <Object>
blockPosition
- xxxxx
blockStart
- xxxxx
collection
- xxxxx
hashHead
- xxxxx
hashTail
- xxxxx
hashValue
- xxxxx
position
- xxxxx
readLimit
- xxxxx
writeLimit
- xxxxx
<<
we want a readable version of nextPutAll however it may be difficult to fully recreate nextPutAll:
for all the different types of stream. Rather then simply send to nextPutAll:
we handle the String (or ByteArray) argument
as fast as possible - the rest we delegate to putOn: This means that we handle single characters and bytes
whereas nextPutAll: is only for sequencable collections.
.
Note this may not work in every case that nextPutAll: does subject to extensive testing,
but it should work in the important cases
back
Goes back one position in the stream.
basicNextPut:
braceArray
This method is used in compilation of brace constructs.
It MUST NOT be deleted or altered.
compare:with:min:
Compare the two strings and return the length of matching characters.
minLength is a lower bound for match lengths that will be accepted.
Note: here and matchPos are zero based.
contents
contentsOfEntireFile
For non-file streams
copyMethodChunkFrom:
Copy the next chunk from aStream (must be different from the receiver).
copyMethodChunkFrom:at:
Copy the next chunk from aStream (must be different from the receiver).
copyPreamble:from:at:
Look for a changeStamp for this method by peeking backward.
Write a method preamble, with that stamp if found.
cr
crtab
crtab:
Append a return character, followed by anInteger tab characters, to the
receiver.
deflateBlock
Deflate the current contents of the stream
deflateBlock:chainLength:goodMatch:
Continue deflating the receiver's collection from blockPosition to lastIndex.
Note that lastIndex must be at least MaxMatch away from the end of collection
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
encodeLiteral:
encodeMatch:distance:
Encode the given match of length length starting at dist bytes ahead
ensureASpace
Append a space character to the receiver IFF there is not one on the end.
ensureEndsWith:
Append anObject to the receiver IFF there is not one on the end.
findMatch:lastLength:lastMatch:chainLength:goodMatch:
Find the longest match for the string starting at here.
If there is no match longer than lastLength return lastMatch/lastLength.
Traverse at most maxChainLength entries in the hash table.
Stop if a match of at least goodMatch size has been found.
flush
Force compression
flushBlock
Flush a deflated block
goodMatchLength
Return the length that is considered to be a 'good' match.
Higher values will result in better compression but take more time.
growTo:
anInteger is the required minimal new size of the collection
hashChainLength
Return the max. number of hash chains to traverse.
Higher values will result in better compression but take more time.
header
If the stream requires a standard header, override this message. See HtmlFileStream
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeHashTables
insertStringAt:
Insert the string at the given start position into the hash table.
Note: The hash value is updated starting at MinMatch-1 since
all strings before have already been inserted into the hash table
(and the hash value is updated as well).
isEmpty
Returns a boolean indicating wheter there are any sequence values in the receiver. That is to say, there is no element before and no element after the current position.
isTypeHTTP
few senders
localName
moveContentsToFront
Move the contents of the receiver to the front
next
checking if datas have already been decompressed.
If no, close the stream to force decompression.
next:put:
Stores anObject as the next anInteger number of elements. Answer anObject.
next:putAll:
Store the next anInteger elements from the given collection.
next:putAll:startingAt:
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[.
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:
nextWordsPutAll:
Write the argument a word-like object in big endian format on the receiver.
May be used to write other than plain word-like objects (such as ColorArray).
on:
openReadOnly
originalContents
position
Answer the current position of accessing the sequence of objects.
position:
Sets the number of element before the position to be the parameter newPosition. 0 for the start of the stream. Throws an error if the parameter is lesser than 0 or greater than the size.
positionOfSubCollection:
Return a position such that that element at the new position equals the first element of sub, and the next elements equal the rest of the elements of sub. Begin the search at the current position.
If no such match is found, answer 0.
positionOfSubCollection:ifAbsent:
Return a position such that that element at the new position equals the first element of sub, and the next elements equal the rest of the elements of sub. Begin the search at the current position.
If no such match is found, answer the result of evaluating argument, exceptionBlock.
print:
Asks the object to print itself on the receiver.
pushBack:
readOnly
reset
Resets the position of the receiver to be at the start of the stream.
resetContents
Set the position and limits to 0.
resetToStart
setFrom:to:
setToEnd
Set the position of the stream to its end. No more element after the current position will stay after this call.
size
Returns an integer indicating the number of elements we can position into.
sleep
an FTP-based stream might close the connection here
space
space:
Append anInteger space characters to the receiver.
tab
tab:
trailer
If the stream requires a standard trailer, override this message. See HtmlFileStream
updateHash:
Update the running hash value based on the next input byte.
Return the new updated hash value.
updateHashAt:
Update the hash value at position here (one based)
updateHashTable:delta:
validateMatchAt:from:to:
verbatim:
Do not attempt to translate the characters. Use to override nextPutAll:
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
write:
NSDecoderGZipReadStream
A NSDecoderGZipReadStream is xxxxxxxxx.
Instance Variables
expectedCrc: <Object>
expectedCrc
- xxxxx
fileIn:
fileIntoNewChangeSet:
fileReaderServicesForFile:suffix:
on:from:to:
Check the header of the GZIP stream.
saveContents:
serviceDecompressToFile
serviceFileIn
serviceFileIntoNewChangeSet
serviceViewDecompress
services
uncompressedFileName:
unload
verifyCrc
Verify the crc checksum in the input
viewContents:
NSDecoderGZipReadStreamTest
A NSDecoderGZipReadStreamTest is xxxxxxxxx.
Instance Variables
datas: <Object>
emptyStream: <Object>
encodedDatas: <Object>
datas
- xxxxx
emptyStream
- xxxxx
encodedDatas
- xxxxx
setUp
testAtEnd
testContents
testNextWithSwitchBinaryText
testOn
testOnFromTo
NSDecoderGZipWriteStream
A NSDecoderGZipWriteStream is xxxxxxxxx.
Instance Variables
compressFile:
fileReaderServicesForFile:suffix:
initialize
Subclasses should redefine this method to perform initializations on instance creation
serviceCompressFile
services
unload
writeFooter
Write some footer information for the crc
writeHeader
Write the GZip header
NSDecoderInflateStream
A NSDecoderInflateStream is an implementation of InflateStream based on NSDecoder from Nile.
Instance Variables
bitBuf: <Object>
bitPos: <Object>
crc: <Object>
distTable: <Object>
litTable: <Object>
source: <Object>
sourceLimit: <Object>
sourcePos: <Object>
sourceStream: <Object>
state: <Object>
bitBuf
- xxxxx
bitPos
- xxxxx
crc
- xxxxx
distTable
- xxxxx
litTable
- xxxxx
source
- xxxxx
sourceLimit
- xxxxx
sourcePos
- xxxxx
sourceStream
- xxxxx
state
- xxxxx
<<
asBinaryOrTextStream
Convert to a stream that can switch between bytes and characters
ascii
atEnd
Note: It is possible that we have a few bits left,
representing just the EOB marker. To check for
this we must force decompression of the next
block if at end of data.
back
Go back one element and return it.
backChunk
Answer the contents of the receiver back to the previous terminator character. Doubled terminators indicate an embedded terminator character.
backUpTo:
Back up the position to he subCollection. Position must be somewhere within the stream initially. Leave it just after it. Return true if succeeded. No wildcards, and case does matter.
basicNextChunk
Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character.
bitPosition
Return the current bit position of the source
checkForPreamble:
close
Disassociate a stream from its backing store. Does nothing by default. Streams over files for example will have to close the file in this method.
computeHuffmanValues:counts:from:to:
Assign numerical values to all codes.
Note: The values are stored according to the bit length
contents
contentsOfEntireFile
For non-file streams
crcError:
createHuffmanTables:counts:from:to:
Create the actual tables
decodeDynamicTable:from:
Decode the code length of the literal/length and distance table
in a block compressed with dynamic huffman trees
decodeString:andRuns:
decodeValueFrom:
Decode the next value in the receiver using the given huffman table.
decompressAll
Profile the decompression speed
decompressBlock:with:
Process the compressed data in the block.
llTable is the huffman table for literal/length codes
and dTable is the huffman table for distance codes.
distanceMap
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
flush
Do nothing by default
getFirstBuffer
Get the first source buffer after initialization has been done
getNextBlock
growHuffmanTable:
header
If the stream requires a standard header, override this message. See HtmlFileStream
huffmanTableFrom:mappedBy:
Create a new huffman table from the given code lengths.
Map the actual values by valueMap if it is given.
See the class comment for a documentation of the huffman
tables used in this decompressor.
increment:bits:
Increment value in reverse bit order, e.g.
for a 3 bit value count as follows:
000 / 100 / 010 / 110
001 / 101 / 011 / 111
See the class comment why we need this.
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEmpty
Answer whether the receiver's contents has no elements.
isTypeHTTP
few senders
last
Return the final element in the receiver
literalLengthMap
localName
mapValues:by:
match:
Set the access position of the receiver to be past the next occurrence of the subCollection. Answer whether subCollection is found. No wildcards and case does matter.
moveContentsToFront
Move the decoded contents of the receiver to the front so that we have enough space for decoding more data.
moveSourceToFront
Move the encoded contents of the receiver to the front so that we have enough space for decoding more data.
next
next:into:
Read n objects into the given collection.
Return aCollection or a partial copy if less than
n elements have been read.
next:into:startingAt:
Read n objects into the given collection.
Return aCollection or a partial copy if less than
n elements have been read.
nextBits:
nextByte
nextChunk
Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character.
nextChunkText
Deliver the next chunk as a Text. Decode the following ]style[ chunk if present. Position at start of next real chunk.
nextDelimited:
Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character. For example: 'this '' was a quote'. Start postioned before the initial terminator.
nextLine
Answer next line (may be empty), or nil if at end
nextMatchAll:
Answer true if next N objects are the ones in aColl,
else false. Advance stream of true, leave as was if false.
nextSingleBits:
Fetch the bits all at once
oldBack
Go back one element and return it. Use indirect messages in case I am a StandardFileStream
oldPeekBack
Return the element at the previous position, without changing position. Use indirect messages in case self is a StandardFileStream.
on:
on:from:to:
openReadOnly
originalContents
Answer the receiver's actual contents collection, NOT a copy. 1/29/96 sw
outputCollectionClass
parseLangTagFor:
pastEndRead
A client has attempted to read beyond the read limit.
Check in what state we currently are and perform
the appropriate action
peekBack
Return the element at the previous position, without changing position. Use indirect messages in case self is a StandardFileStream.
position
Answer the current position of accessing the sequence of objects.
position:
Set the current position for accessing the objects to be anInteger, as long
as anInteger is within the bounds of the receiver's contents. If it is not,
create an error notification.
positionError
Since I am not necessarily writable, it is up to my subclasses to override
position: if expanding the collection is preferrable to giving this error.
positionOfSubCollection:
Return a position such that that element at the new position equals the first element of sub, and the next elements equal the rest of the elements of sub. Begin the search at the current position.
If no such match is found, answer 0.
positionOfSubCollection:ifAbsent:
Return a position such that that element at the new position equals the first element of sub, and the next elements equal the rest of the elements of sub. Begin the search at the current position.
If no such match is found, answer the result of evaluating argument, exceptionBlock.
print:
Have anObject print itself on the receiver.
proceedDynamicBlock
proceedFixedBlock
proceedStoredBlock
Proceed decompressing a stored (e.g., uncompressed) block
processDynamicBlock
processFixedBlock
processStoredBlock
Skip to byte boundary
profile
Profile the decompression speed
pushBack:
Compatibility with SocketStreams
readOnly
readStream
polymorphic with SequenceableCollection. Return self
reset
Position zero - nothing decoded yet
resetContents
Set the position and limits to 0.
setToEnd
Refer to the comment in PositionableStream|setToEnd.
skipSeparators
skipSeparatorsAndPeekNext
A special function to make nextChunk fast
skipStyleChunk
Get to the start of the next chunk that is not a style for the previous chunk
sleep
an FTP-based stream might close the connection here
sourceLimit
sourceStream
trailer
If the stream requires a standard trailer, override this message. See HtmlFileStream
unCommand
If this read stream is at a <, then skip up to just after the next >. For removing html commands.
upToAll:
Answer a subcollection from the current access position to the occurrence (if any, but not inclusive) of aCollection. If aCollection is not in the stream, answer the entire rest of the stream.
upToAny:
Answer a subcollection from the current access position to the
occurrence (if any, but not inclusive) of any objects in the given collection in the receiver. If
any of these is not in the collection, answer the entire rest of the receiver.
upToEnd
Answer a subcollection from the current access position through the last element of the receiver.
updateCrc:from:to:in:
Answer an updated CRC for the range of bytes in aCollection.
Subclasses can implement the appropriate means for the check sum they wish to use.
verbatim:
Do not attempt to translate the characters. Use to override nextPutAll:
verifyCrc
Verify the crc checksum in the input
NSDecoderZLibReadStream
A NSDecoderZLibReadStream is xxxxxxxxx.
Instance Variables
expectedCrc: <Object>
expectedCrc
- xxxxx
expectedCrc:
If expectedCrc is set, it will be compared against the calculated CRC32 in verifyCrc.
This number should be the number read from the Zip header (which is the bitwise complement of my crc if all is working correctly)
on:from:to:
verifyCrc
Verify the CRC-32 checksum calculated from the input against the expected CRC-32, if any.
Answer the calculated CRC-32 in any case.
Note that the CRC-32 used in Zip files is actually the bit inverse of the calculated value, so that is what is returned.
NSDecoderZLibWriteStream
A NSDecoderZLibWriteStream is xxxxxxxxx.
Instance Variables
on:
writeFooter
Store the Adler32 checksum as the last 4 bytes.
writeHeader
Write header information
NSDecoderZipReadStream
A NSDecoderZipReadStream is xxxxxxxxx.
Instance Variables
expectedCrc: <Object>
expectedCrc
- xxxxx
expectedCrc:
If expectedCrc is set, it will be compared against the calculated CRC32 in verifyCrc.
This number should be the number read from the Zip header (which is the bitwise complement of my crc if all is working correctly)
on:from:to:
updateCrc:from:to:in:
Answer an updated CRC for the range of bytes in aCollection.
Subclasses can implement the appropriate means for the check sum they wish to use.
verifyCrc
Verify the CRC-32 checksum calculated from the input against the expected CRC-32, if any.
Answer the calculated CRC-32 in any case.
Note that the CRC-32 used in Zip files is actually the bit inverse of the calculated value, so that is what is returned.
NSDecoderZipReadStreamTest
A NSDecoderZipReadStreamTest is xxxxxxxxx.
Instance Variables
datas: <Object>
emptyStream: <Object>
encodedDatas: <Object>
datas
- xxxxx
emptyStream
- xxxxx
encodedDatas
- xxxxx
setUp
testAtEnd
testContents
testNextWithSwitchBinaryText
testOn
testOnFromTo
NSDecoderZipWriteStream
A NSDecoderZipWriteStream is xxxxxxxxx.
Instance Variables
writeFooter
Write footer information if necessary
writeHeader
Write header information if necessary
NSDecoderZipWriteStreamTest
A NSDecoderZipWriteStreamTest is xxxxxxxxx.
Instance Variables
datas: <Object>
emptyStream: <Object>
datas
- xxxxx
emptyStream
- xxxxx
setUp
testAtEnd
testEncodedStream
testNextWithSwitchBinaryText
testOn
NSDrainer
A NSDrainer is xxxxxxxxx.
Instance Variables
inputStream: <Object>
outputStream: <Object>
inputStream
- xxxxx
outputStream
- xxxxx
drainFast
drainFastFrom:to:
drainWithLowMemory
drainWithLowMemoryFrom:to:
inputStream:
outputStream:
NSDummyStream
The purpose of this class is to absorb all steam messages and do nothing. This is so NSReferenceStream can pretend to write on it while traversing all objects it would normally write. We need to know what those object are. 8/17/96 tk
atEnd
Returns a boolean indicating whether the receiver is at the end of its values (no more entry to read).
do:
Reads elements and passes them one after the other as aBlock argument. Take care that your stream is not an infinite stream while using this method.
isBinary
isClosed
next
Reads the next object in the stream and returns it. Please ensure that the stream is not at its end before calling #next. Behavior is not defined if the stream is at its end.
nextInt32Put:
do nothing
nextNumber:put:
do nothing
nextPut:
Appends anObject to the receiver's past sequence values. If the receiver's future sequence values is not empty, removes its first object. Returns anObject.
nextPutAll:
Enumerates the argument, adding each element to the receiver. Returns aCollection.
nextStringPut:
do nothing
on:
originalContents
outputCollectionClass
This method must return a Collection class. This class will be used to return collection of elements when #next: or #upTo: are sent. In fact, any kind of class which answers to #newFrom: can be used as soon as #newFrom: accepts a collection as a parameter.
peek
Returns the next object in the receiver's future sequence values without advancing the receiver's position. Returns nil if the receiver is at end of stream.
position
Return any random number. Here is where the real lying begins. We are a DummyStream afterall. 8/17/96 tk
position:
Pretend to position wherever the caller says!
skip:
Skips the next amount objects in the receiver's future sequence values. Just go to the end if there is not enough element in the stream.
NSFileStream
A NSFileStream is xxxxxxxxx.
Instance Variables
fileID: <Object>
fileName: <Object>
isBinary: <Object>
fileID
- xxxxx
fileName
- xxxxx
isBinary
- xxxxx
atEnd
binary
bufferType
bufferWithAll:
close
Disassociate a stream from its backing store.
detectFile:do:
fileName
fileNamed:forWriting:
fileNamed:forWriting:do:
finalize
Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority.
flush
Ensure the backing store is updated.
fullName:
getFileID
isBinary
isClosed
Answer true if this file is closed.
next
Reads the next object in the stream and returns it. Please ensure that the stream is not at its end before calling #next. Behavior is not defined if the stream is at its end.
next:
Reads the next amount objects in the stream and returns a collection containing them in the same order.
nextPut:
nextPutAll:
Enumerates the argument, adding each element to the receiver. Returns aCollection.
open:forWrite:
Open the file with the given name. If writeMode is true, allow writing, otherwise open the file in read-only mode.
outputCollectionClass
This method must return a Collection class. This class will be used to return collection of elements when #next: or #upTo: are sent. In fact, any kind of class which answers to #newFrom: can be used as soon as #newFrom: accepts a collection as a parameter.
peek
Returns the next object in the receiver's future sequence values without advancing the receiver's position. Returns nil if the receiver is at end of stream.
position
Returns the number of sequence values in the receiver's past sequence values.
primAtEnd:
Answer true if the file position is at the end of the file.
primClose:
Close this file.
primCloseNoError:
Close this file. Don't raise an error if the primitive fails.
primFlush:
Flush pending changes to the disk
primGetPosition:
Get this files current position.
primOpen:writable:
Open a file of the given name, and return the file ID obtained.
If writableFlag is true, then
if there is none with this name, then create one
else prepare to overwrite the existing from the beginning
otherwise
if the file exists, open it read-only
else return nil
primRead:into:startingAt:count:
Read up to count bytes of data from this file into the given string or byte array starting at the given index. Answer the number of bytes actually read.
primSetPosition:to:
Set this file to the given position.
primSize:
Answer the size of this file.
primSizeNoError:
Answer the size of this file. Answer nil if the primitive fails; this indicates that the file handle has become stale.
primTruncate:to:
Truncate this file to the given position.
primWrite:from:startingAt:count:
Write count bytes onto this file from the given string or byte array starting at the given index. Answer the number of bytes written.
register
register:
registry
retryWithGC:until:forFileNamed:
setFileID:
setFileName:
setPosition:
Required accessor to a variable. No need to check anything here because the check is done in #position:.
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.
textual
truncate
Truncate from the current position
truncate:
Truncate to this position
unregister
unregister:
NSFileStreamTest
A NSFileStreamTest is xxxxxxxxx.
Instance Variables
elementToBePut
nonEmptyStream
stream
tearDown
testIsBinaryOnBinaryStream
testIsBinaryOnNonBinaryStream
testIsClosedTest
testReadWriteBinary
testReadWriteBinary2
testReadWriteText
testReadWriteText2
testSimpleWriteData
testTruncateBinary
testTruncateText
NSGZipReadStream
A NSGZipReadStream is xxxxxxxxx.
Instance Variables
expectedCrc: <Object>
expectedCrc
- xxxxx
fileIn:
fileIntoNewChangeSet:
fileReaderServicesForFile:suffix:
on:from:to:
Check the header of the GZIP stream.
saveContents:
serviceDecompressToFile
serviceFileIn
serviceFileIntoNewChangeSet
serviceViewDecompress
services
uncompressedFileName:
unload
updateCrc:from:to:in:
Answer an updated CRC for the range of bytes in aCollection
verifyCrc
Verify the crc checksum in the input
viewContents:
NSGZipWriteStream
A NSGZipWriteStream is xxxxxxxxx.
Instance Variables
compressFile:
fileReaderServicesForFile:suffix:
initialize
Subclasses should redefine this method to perform initializations on instance creation
serviceCompressFile
services
unload
writeFooter
Write some footer information for the crc
writeHeader
Write the GZip header
NSHistory
A NSHistory is xxxxxxxxx.
Instance Variables
internalStream: <Object>
wrap: <Object>
internalStream
- xxxxx
wrap
- xxxxx
atEnd
atStart
back
#back does not return anything. This is because if the history is empty and wrap-mode is activated, there is nothing to return
contents
current
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEmpty
next
nextPut:
outputCollectionClass
peek
position
randomPosition
reset
setPosition:
setToEnd
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.
skip:
wrap
NSHistoryTest
A NSHistoryTest is xxxxxxxxx.
Instance Variables
elementToBePut
historyNew
historyOnArray
nonEmptyStream
stream
streamWith:
streamingOver:
testAtRandom
Ensure that #atRandom will move around all the history if called enough
testBackDoesNotChangeSize
testBackOnEmpty
testBackWhenAtStart
testContents
testCurrentAfterSomeNexts
testCurrentOnEmpty
testCurrentWithWrapping
testNextPutErases
testNextPutReplaces
testSkips
testWrapWithNext
testWrapWithOneElement
testWrapWithoutElement
NSJPEGReadStream
A NSJPEGReadStream is xxxxxxxxx.
Instance Variables
bitBuffer: <Object>
bitsInBuffer: <Object>
collection: <Object>
position: <Object>
readLimit: <Object>
bitBuffer
- xxxxx
bitsInBuffer
- xxxxx
collection
- xxxxx
position
- xxxxx
readLimit
- xxxxx
buildLookupTable:counts:
createHuffmanTables:counts:from:to:
Create the actual tables
decodeValueFrom:
Decode the next value in the receiver using the given huffman table.
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
fillBuffer
getBits:
growHuffmanTable:
initialize
Subclasses should redefine this method to perform initializations on instance creation
nextByte
nextBytes:
on:
reset
resetBitBuffer
NSJPEGReadStreamTest
A NSJPEGReadStreamTest is xxxxxxxxx.
Instance Variables
NSLimitedWriteStream
A NSLimitedWriteStream is xxxxxxxxx.
Instance Variables
collection: <Object>
limit: <Object>
limitBlock: <Object>
position: <Object>
writeLimit: <Object>
collection
- xxxxx
limit
- xxxxx
limitBlock
- xxxxx
position
- xxxxx
writeLimit
- xxxxx
back
Goes back one position in the stream.
basicNextPut:
basicNextPutAll:
growTo:
anInteger is the required minimal new size of the collection
next:put:
Stores anObject as the next anInteger number of elements. Answer anObject.
nextPut:
Ensure that the limit is not exceeded
nextPutAll:
Enumerates the argument, adding each element to the receiver. Returns aCollection.
noCheckNextPut:
make a 'basic' nextPut without checking the limit value
noCheckNextPutAll:
make a 'basic' nextPutAll without checking the limit value
on:
pastEndPut:
Grow the collection by doubling the size, but keeping the growth between 20 and 1000000.
Then put <anObject> at the current write position.
position
Returns the number of element before the current position in the stream.
setLimit:limitBlock:
Limit the numer of elements this stream will write...
setPosition:
Required accessor to a variable. No need to check anything here because the check is done in #position:.
size
Returns an integer indicating the number of elements we can position into.
NSLimitedWriteStreamTest
A NSLimitedWriteStreamTest is xxxxxxxxx.
Instance Variables
nonEmpty: <Object>
stream: <Object>
nonEmpty
- xxxxx
stream
- xxxxx
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
nonEmptyStream
setUp
stream
Returns any stream.
testNextPutAllOverLimit
testNextPutOverLimit
testPastEndPutOverLimit
testWriteBack71
Represents a list to be used in linked list. To create a linked list easily:
link := #(1 true (a b c)) as: RFLink.
hasNextLink
newFrom:
nextLink
nextLink:
value
value:
value:nextLink:
NSLinkedListStream
Stream over a linked list. The linked list will be modified if you use write methods like #nextPut: and #nextPutAll:.
To create an instance of me:
link := #(1 true (a b c)) as: RFLink.
stream := RFLinkedListStream on: link.
Then, you can:
stream next.
stream nextPut: false.
stream next.
stream next: 2 put: 4.
Your link now represents #(1 false (a b c) 4 4)
atEnd
forward
initialize
Subclasses should redefine this method to perform initializations on instance creation
newLinkValue:nextLink:
next
nextPut:
on:
outputCollectionClass
This method must return a Collection class. This class will be used to return collection of elements when #next: or #upTo: is sent.
peek
setLink:
NSLinkedListStreamTest
A NSLinkedListStreamTest is xxxxxxxxx.
Instance Variables
elementToBePut
nonEmptyStream
stream
testLinkedListScenario1
NSMCPseudoFileStream
A NSMCPseudoFileStream is xxxxxxxxx.
Instance Variables
localName: <Object>
localName
- xxxxx
localName
localName:
NSMCPseudoFileStreamTest
A NSMCPseudoFileStreamTest is xxxxxxxxx.
Instance Variables
classToBeTested
shouldInheritSelectors
NSMailAddressTokenizer
A NSMailAddressTokenizer is xxxxxxxxx.
Instance Variables
cachedToken: <Object>
pos: <Object>
text: <Object>
cachedToken
- xxxxx
pos
- xxxxx
text
- xxxxx
atEnd
atEndOfChars
do:
Reads elements and passes them one after the other as aBlock argument. Take care that your stream is not an infinite stream while using this method.
forString:
initialize
Subclasses should redefine this method to perform initializations on instance creation
initialize:
next
nextAtom
nextChar
nextComment
nextDomainLiteral
nextQuotedString
nextSpecial
nextToken
outputCollectionClass
This method must return a Collection class. This class will be used to return collection of elements when #next: or #upTo: are sent. In fact, any kind of class which answers to #newFrom: can be used as soon as #newFrom: accepts a collection as a parameter.
peek
peekChar
skipSeparators
tokensIn:
upToElementSatisfying:
Returns a collection of all of the objects in the receiver up to, but not including, the next element satisfying oneArgumentBlock. Sets the stream to read the object just after the element satisfying oneArgumentBlock. If no element satisfies the block and the end of the stream is encountered, an ordered collection of the objects read is returned.
upToEnd
Answers remaining elements. Position the stream to its end.
NSMailAddressTokenizerTest
A NSMailAddressTokenizerTest is xxxxxxxxx.
Instance Variables
testForString
testNextAtom
testNextElements
testNextWithSwitchBinaryText
testPeek
testPeekFor

Elements return by reading a NSMailAddressTokinizer are intances of MailAdressToken.
MailAdressToken does not redifine #=
Therfore you will never be able to use #peekFor correctly.
( it will always return false as elements will never be identical)
testTokensIn
NSMockBufferedStream
I'm a gettable stream used to verify the buffer behavior. I throw an error if #next or #peek are called because the buffer must only call #next: (otherwise access from the buffer are not efficient).
atEnd
next
next:
outputCollectionClass
peek
NSMultiByteBinaryOrTextStream
A NSMultiByteBinaryOrTextStream is xxxxxxxxx.
Instance Variables
converter: <Object>
isBinary: <Object>
readLimit: <Object>
writeLimit: <Object>
converter
- xxxxx
isBinary
- xxxxx
readLimit
- xxxxx
writeLimit
- xxxxx
asBinaryOrTextStream
ascii
back
Goes back one position in the stream.
basicNext
this method have been overriden to permit read-access.
Indeed, #next ask to the converter to read from itSelf. The converter then use the method #basicNext.
With the initial code of #basicNext ( which is ' self next ') we get in a loop.
basicNext:
basicNext:into:
basicNextInto:
basicNextPut:
basicNextPutAll:
basicPeek
basicPosition
basicPosition:
binary
closed
self deprecated: 'Please use #isClosed instead.'.
contents
Return a collection containing the complete contents of the stream.
converter
converter:
defaultConverter
fileIn
This is special for reading expressions from text that has been formatted
with exclamation delimitors. The expressions are read and passed to the
Compiler. Answer the result of compilation.
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?
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.
guessConverter
header
If the stream requires a standard header, override this message. See HtmlFileStream
isBinary
next
Reads the next object in the stream and returns it. Please ensure that the stream is not at its end before calling #next. Behavior is not defined if the stream is at its end.
next:
Reads the next amount objects in the stream and returns a collection containing them in the same order.
next:put:
Stores anObject as the next anInteger number of elements. Answer anObject.
nextInto:
Read the next elements of the receiver into aCollection.
Return aCollection or a partial copy if less than aCollection
size elements have been read.
nextPut:
Appends anObject to the receiver's past sequence values. If the receiver's future sequence values is not empty, removes its first object. Returns anObject.
nextPutAll:
Enumerates the argument, adding each element to the receiver. Returns aCollection.
on:
on:encoding:
outputCollectionClass
This method must return a Collection class. This class will be used to return collection of elements when #next: or #upTo: are sent. In fact, any kind of class which answers to #newFrom: can be used as soon as #newFrom: accepts a collection as a parameter.
padToEndWith:
We don't have pages, so we are at the end, and don't need to pad.
pastEndPut:
Grow the collection by doubling the size, but keeping the growth between 20 and 1000000.
Then put <anObject> at the current write position.
peek
Returns the next object in the receiver's future sequence values without advancing the receiver's position. Returns nil if the receiver is at end of stream.
peekFor:
Answer false and do not move over the next element if it is not equal to
the argument, anObject, or if the receiver is at the end. Answer true
and increment the position, if the next element is equal to anObject.
position
Answer the current position of accessing the sequence of objects.
setConverterForCode
setEncoderForSourceCodeNamed:
setFileTypeToObject
do nothing. We don't have a file type
setPosition:
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.
skipSeparators
superNextPut:
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.
text
trailer
If the stream requires a standard trailer, override this message. See HtmlFileStream
upTo:
Returns a collection of all of the objects in the receiver up to, but not including, the next occurrence ofthe argument. Sets the stream to read the object just after the next occurrence of the argument. If the argument is not found and the end of the stream is encountered, an ordered collection of the objects read is returned.
with:encoding:
NSMultiByteBinaryOrTextStreamTest
A NSMultiByteBinaryOrTextStreamTest is xxxxxxxxx.
Instance Variables
classToFileOut: <Object>
datasConvertedToMacRoman: <Object>
nonEmptyStream: <Object>
stream: <Object>
streamWithHello: <Object>
classToFileOut
- xxxxx
datasConvertedToMacRoman
- xxxxx
nonEmptyStream
- xxxxx
stream
- xxxxx
streamWithHello
- xxxxx
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
nonEmptyStream
setUp
stream
Returns any stream.
tearDown
We delete files generated by the tests
testFileIn
exporting the class definition in a chunk format file ( if this file doesn't yet exist)
testFileInExpresion
testFileInForFileStream
testFileOut
testFileOutFileIn
testNextWithSwitchBinaryText
NSNoCurrentInHistory
A NSNoCurrentInHistory is xxxxxxxxx.
Instance Variables
NSNumberReader
A NSNumberReader is xxxxxxxxx.
Instance Variables
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
inputStream:
NSNumberReaderTest
A NSNumberReaderTest is xxxxxxxxx.
Instance Variables
readerOn:
testAtEnd
testDifficulty1
testDifficulty2
testNoDifficulty1
testNoDifficulty2
testPeek
testWithoutAString
NSPipeEntry
A NSPipeEntry is xxxxxxxxx.
Instance Variables
buffer: <Object>
drainer: <Object>
lastPipe: <Object>
outputStream: <Object>
buffer
- xxxxx
drainer
- xxxxx
lastPipe
- xxxxx
outputStream
- xxxxx
atEnd
close
flush
initialize
Subclasses should redefine this method to perform initializations on instance creation
lastPipe:
next
nextPut:
outputCollectionClass
outputStream:
peek
resetAtEndStatuses
NSPipeEntryTest
A NSPipeEntryTest is xxxxxxxxx.
Instance Variables
testScenario1
testScenario2
testScenario3
NSPipeTest
A NSPipeTest is xxxxxxxxx.
Instance Variables
tearDown
testScenario1
Writes some random numbers to a text file. Opening this file with an editor will show exactly this string. The file size is equivalent to the size of the string (61 bytes).
NSRBScanner
A NSRBScanner is xxxxxxxxx.
Instance Variables
buffer: <Object>
characterType: <Object>
classificationTable: <Object>
comments: <Object>
currentCharacter: <Object>
errorBlock: <Object>
extendedLanguage: <Object>
extendedLiterals: <Object>
extendedSymbols: <Object>
nameSpaceCharacter: <Object>
numberType: <Object>
separatorsInLiterals: <Object>
stream: <Object>
tokenStart: <Object>
buffer
- xxxxx
characterType
- xxxxx
classificationTable
- xxxxx
comments
- xxxxx
currentCharacter
- xxxxx
errorBlock
- xxxxx
extendedLanguage
- xxxxx
extendedLiterals
- xxxxx
extendedSymbols
- xxxxx
nameSpaceCharacter
- xxxxx
numberType
- xxxxx
separatorsInLiterals
- xxxxx
stream
- xxxxx
tokenStart
- xxxxx
classificationTable
classificationTable:
classify:
contents
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
errorBlock
errorBlock:
errorPosition
extendedLanguage
extendedLanguage:
flush
getComments
initialize
Subclasses should redefine this method to perform initializations on instance creation
initializeChars:to:
initializeForSqueak
isSelector:
isVariable:
on:
on:errorBlock:
outputCollectionClass
patternVariableCharacter
previousStepPosition
rewriteOn:
rewriteOn:errorBlock:
scanAnySymbol
scanBinary:
scanByteArray
scanExponentMultipler
scanExtendedSymbol
scan symbols like #. which are allowed by Squeak but aren't standard
scanIdentifierOrKeyword
scanLiteral
scanLiteralArray
scanLiteralArrayParts
scanLiteralCharacter
scanLiteralString
scanName
scanNamespaceName
scanNumber
scanNumberIBM
scanNumberOfBase:
Scan a number. Return the number or nil if the current input isn't a valid number.
scanNumberWithoutExponent
Scan an IBM number with the radix -- don't scan the exponent though
scanPatternVariable
scanQualifier
scanSpecialCharacter
scanStringSymbol
scanSymbol
scanToken
fast-n-ugly. Don't write stuff like this. Has been found to cause cancer in laboratory rats. Basically a
case statement. Didn't use Dictionary because lookup is pretty slow.
scannerError:
Evaluate the block. If it returns raise an error
step
stripComment
stripSeparators
NSRBScannerTest
A NSRBScannerTest is xxxxxxxxx.
Instance Variables
nonEmpty: <Object>
token1: <Object>
token2: <Object>
nonEmpty
- xxxxx
token1
- xxxxx
token2
- xxxxx
nonEmptyStream
Must return a non-empty stream positioned at its begining.
setUp
testOn
NSRWBinaryOrTextStream
A NSRWBinaryOrTextStream is xxxxxxxxx.
Instance Variables
isBinary: <Object>
readLimit: <Object>
isBinary
- xxxxx
readLimit
- xxxxx
asBinaryOrTextStream
ascii
atEnd
Answers true if and only if there is no more element to read.
back
Goes back one position in the stream and returns the new next element.
binary
closed
contents
Answer with a copy of my collection from 1 to readLimit.
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.
growTo:
anInteger is the required minimal new size of the collection
header
If the stream requires a standard header, override this message. See HtmlFileStream
isBinary
next
Reads the next object in the stream and returns it.
next:
Answer the next anInteger elements of my collection. Must override to get class right.
next:into:startingAt:
Read n objects into the given collection.
Return aCollection or a partial copy if less than n elements have been read.
nextInto:
Read the next elements of the receiver into aCollection.
Return aCollection or a partial copy if less than aCollection
size elements have been read.
nextPut:
Appends anObject to the receiver's past sequence values. If the receiver's future sequence values is not empty, removes its first object.
nextPutAll:
nextString
Read a string from the receiver. The first byte is the length of the string, unless it is greater than 192, in which case the first four bytes encode the length.
on:
padToEndWith:
We don't have pages, so we are at the end, and don't need to pad.
pastEndPut:
Grow the collection by doubling the size, but keeping the growth between 20 and 1000000.
Then put <anObject> at the current write position.
peek
Returns the next object in the receiver's future sequence values without advancing the receiver's position. Returns nil if the receiver is at end of stream.
peekFor:
Answer false and do not move over the next element if it is not equal to
the argument, anObject, or if the receiver is at the end. Answer true
and increment the position, if the next element is equal to anObject.
position
position:
Sets the number of element before the position to be the parameter newPosition. 0 for the start of the stream. Throws an error if the parameter is lesser than 0 or greater than the size.
reset
Set the receiver's position to the beginning of the sequence of objects.
setFileTypeToObject
do nothing. We don't have a file type
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.
skipSeparators
superNextPut:
superNextPutAll:
text
trailer
If the stream requires a standard trailer, override this message. See HtmlFileStream
upTo:
Returns a collection of all of the objects in the receiver up to, but not including, the next occurrence ofthe argument. Sets the stream to read the object just after the next occurrence of the argument. If the argument is not found and the end of the stream is encountered, an ordered collection of the objects read is returned.
upToEnd
Must override to get class right.
withNoImportanceOfWhatIsIncludedIn:
NSRWBinaryOrTextStreamTest
A NSRWBinaryOrTextStreamTest is xxxxxxxxx.
Instance Variables
classToBeFileOut: <Object>
emptyStream: <Object>
nonEmpty: <Object>
stream: <Object>
classToBeFileOut
- xxxxx
emptyStream
- xxxxx
nonEmpty
- xxxxx
stream
- xxxxx
classToBeTested
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
nonEmptyStream
setUp
stream
Returns any stream.
tearDown
We delete files generated by the tests
testFileIn
exporting the class definition in a chunk format file ( if this file doesn't yet exist)
testFileInExpresion
testFileOut
testFileOutFileIn
stream is used like a pseudofile in which we fileOut the object 'string' :
testNextPutWitchSwitchBinaryText
testNextWithSwitchBinaryText
testToDebug
use this test to compare the result of the actual version and the nile version
testWritingThroughtAReferenceStream
NSRandom
A NSRandom is xxxxxxxxx.
Instance Variables
seed: <Object>
seed
- xxxxx
a
magic constant = 16807
atEnd
Returns a boolean indicating whether the receiver is at the end of its values (no more entry to read).
defaultSeed
Set a reasonable Park-Miller starting seed
initialize
Subclasses should redefine this method to perform initializations on instance creation
m
magic constant = 2147483647
next
Answer a random Float in the interval [0 ; 1[.
nextInt:
Answer a random integer in the interval [1, anInteger].
nextValue
Returns the key just after aKey. This key is used as an index to the current element. This will be integers for arrays, list items for lists... If there is no more element, throws a RFStreamAtEndError.
outputCollectionClass
peek
Returns the next object in the receiver's future sequence values without advancing the receiver's position. Returns nil if the receiver is at end of stream.
q
r
seed:
NSRandomTest
A NSRandomTest is xxxxxxxxx.
Instance Variables
newRandom
newRandom:
nonEmptyStream
stream
testAverage
testDifferentConsecutives
testDistribution
testNextWithSwitchBinaryText
testSameSeed
NSReferenceStream
A NSReferenceStream is xxxxxxxxx.
Instance Variables
blockers: <Object>
currentReference: <Object>
fwdRefEnds: <Object>
insideASegment: <Object>
objects: <Object>
references: <Object>
skipping: <Object>
blockers
- xxxxx
currentReference
- xxxxx
fwdRefEnds
- xxxxx
insideASegment
- xxxxx
objects
- xxxxx
references
- xxxxx
skipping
- xxxxx
beginInstance:size:
This is for use by storeDataOn: methods. Cf. Object>>storeDataOn:.
beginReference:
Remember anObject as the object we read at the position recorded by
noteCurrentReference:. This must be done after instantiating anObject but
before reading any of its contents that might (directly or indirectly) refer to
it. (It's ok to do this redundantly, which is convenient for #next.)
Answer the reference position.
blockers
blockers:
maps objects -> nil if they should not be written. object -> anotherObject if they need substitution.
example2
getCurrentReference
PRIVATE -- Return the currentReference posn. Always a relative position. So user can cut and paste the Smalltalk source code at the beginning of the file.
insideASegment
insideASegment:
isAReferenceType:
Return true iff typeID is one of the classes that can be written as a reference to an instance elsewhere in the stream.
maybeBeginReference:
See if need to record a reference. In case in the file twice
next
Answer the next object in the stream. If this object was already read, don't re-read it. File is positioned just before the object.
nextPutWeak:
Write a weak reference to anObject to the receiver stream. Answer anObject.
If anObject is not a reference type of object, then just put it normally.
A 'weak' reference means: If anObject gets written this stream via nextPut:,
then its weak references will become normal references. Otherwise they'll
read back as nil. --
noteCurrentReference:
PRIVATE -- If we support references for type typeID, remember
the current byteStream position so beginReference: can add the
next object to the 'objects' dictionary of reference positions,
then return true. Else return false.
objectAt:
PRIVATE -- Read & return the object at a given stream position.
If we already read it, just get it from the objects dictionary.
(Reading it again wouldn't work with cycles or sharing.)
If not, go read it and put it in the objects dictionary.
NOTE: This resolves a cross-reference in the ReferenceStream:
1. A backward reference to an object already read (the normal case).
2. A forward reference which is a sated weak reference (we record where
the object ends so when we get to it normally we can fetch it from
'objects' and skip over it).
3. A backward reference to a 'non-reference type' per the long NOTE in
nextPut: (we compensate here--seek back to re-read it and add the object
to 'objects' to avoid seeking back to read it any more times).
4. While reading a foward weak reference (case 2), we may recursively hit an
ordinary backward reference to an object that we haven't yet read because
we temporarily skipped ahead. Such a reference is forward in time so we
treat it much like case 2.
11/16-24/92 jhm: Handle forward refs. Cf. class comment and above NOTE.
08:57 tk anInteger is a relative position
objectIfBlocked:
See if this object is blocked -- not written out and another object substituted.
on:
project
Return the project we are writing or nil
projectChangeSet
The changeSet of the project we are writing
refTypes:
references
replace:with:
We may wish to remember that in some field, the original object is being replaced by the proxy. For the hybred scheme that collects with a DummyStream and writes an ImageSegment, it needs to hold onto the originals so they will appear in outPointers, and be replaced.
reset
PRIVATE -- Reset my internal state.
11/15-17/92 jhm: Added transients and fwdRefEnds.
7/11/93 sw: Give substantial initial sizes to avoid huge time spent growing.
9/3/93 sw: monster version for Sasha
setCurrentReference:
PRIVATE -- Set currentReference to refPosn. Always a relative position.
setStream:
PRIVATE -- Initialization method.
setStream:reading:
PRIVATE -- Initialization method.
statisticsOfRefs
Analyze the information in references, the objects being written out
tryToPutReference:typeID:
PRIVATE -- If we support references for type typeID, and if
anObject already appears in my output stream, then put a
reference to the place where anObject already appears. If we
support references for typeID but didn't already put anObject,
then associate the current stream position with anObject in
case one wants to nextPut: it again.
Return true after putting a reference; false if the object still
needs to be put.
: Added support for weak refs. Split out outputReference:.
08:42 tk references stores relative file positions.
versionCode
NSReferenceStreamTest
A NSReferenceStreamTest is xxxxxxxxx.
Instance Variables
nonEmpty: <Object>
stream: <Object>
nonEmpty
- xxxxx
stream
- xxxxx
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
example2
nonEmptyStream
Must return non-empty stream positioned at its begining.
setUp
stream
Returns any stream.
testGlobal
NSRemoteFileStream
A NSRemoteFileStream is xxxxxxxxx.
Instance Variables
localDataValid: <Object>
remoteFile: <Object>
localDataValid
- xxxxx
remoteFile
- xxxxx
close
Write if we have data to write. FTP files are always binary to preserve the data exactly. The binary/text (ascii) flag is just for tell how the bits are delivered from a read.
contentsOfEntireFile
Fetch the data off the server and store it in me. But not if I already have it.
dataIsValid
directory
directoryUrl
localName
openReadOnly
If we have data, don't reread.
padToEndWith:
On the Mac, files do not truncate, so pad it with a harmless character. But Remote FTP files always replace, so no need to pad.
readOnly
remoteFile
remoteFile:
sleep
If we are done, then let the server know
NSRemoteFileStreamTest
A NSRemoteFileStreamTest is xxxxxxxxx.
Instance Variables
classToBeTested
NSSelectStream
A NSSelectStream is xxxxxxxxx.
Instance Variables
selectBlock: <Object>
selectBlock
- xxxxx
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
selectBlock:
selectBlock:inputStream:
NSSelectStreamTest
A NSSelectStreamTest is xxxxxxxxx.
Instance Variables
testCombineWithNumberReader
testCreation
testNoDifficulty1
NSSharedQueue
A NSSharedQueue is xxxxxxxxx.
Instance Variables
items: <Object>
monitor: <Object>
items
- xxxxx
monitor
- xxxxx
atEnd
initialize
Subclasses should redefine this method to perform initializations on instance creation
isEmpty
next
nextOrNil
nextOrNilSuchThat:
Answer the next object that satisfies aBlock, skipping any intermediate objects.
If no such object has been queued, answer <nil> and leave me intact.
nextPut:
outputCollectionClass
peek
Answer the object that was sent through the receiver first and has not
yet been received by anyone but do not remove it from the receiver. If
no object has been sent, return nil
printOn:
Append to the argument, aStream, a sequence of characters that
identifies the receiver.
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.
NSSharedQueueTest
A NSSharedQueueTest is xxxxxxxxx.
Instance Variables
elementToBePut
newQueue
nonEmptyStream
stream
testBasics
testContention1
here is a test case that breaks the standard SharedQueue from Squeak 3.8
testNextOrNilSuchThat
NSSmartRefStream
A NSSmartRefStream is xxxxxxxxx.
Instance Variables
classInstVars: <Object>
objCount: <Object>
progressBar: <Object>
renamed: <Object>
renamedConv: <Object>
reshaped: <Object>
steady: <Object>
structures: <Object>
superclasses: <Object>
classInstVars
- xxxxx
objCount
- xxxxx
progressBar
- xxxxx
renamed
- xxxxx
renamedConv
- xxxxx
reshaped
- xxxxx
steady
- xxxxx
structures
- xxxxx
superclasses
- xxxxx
abstractStringx0
appendClassDefns
Make this a fileOut format file. For each UniClass mentioned, prepend its source code to the file. Class name conflicts during reading will be resolved then. Assume instVarInfo: has already been done.
applyConversionMethodsTo:className:varMap:
Modify the object's instance vars to have the proper values
for its new shape. Mostly, fill in defaut values of new inst vars.
Can substitute an object of a different class. (Beware: if
substituted, varMap will not be correct when the new object is asked
to convert.)
bookPageMorphbosfcepcbbfgcc0
BookPageMorph->PasteUpMorph. For reading in old BookMorphs.
catalogValues:size:
Create a dictionary of (name -> value) for the inst vars of this reshaped object. Indexed vars as (1 -> val) etc.
checkCrLf
Watch for a file that has had all of its Cr's converted to CrLf's. Some unpacking programs like Stuffit 5.0 do this by default!
checkFatalReshape:
Inform the user if any of these classes were reshaped. A block has a method from the old system whose receiver is of this class. The method's inst var references might be wrong. OK if inst vars were only added.
cleanUpCategories
clippingMorphbosfcep0
clippingMorphbosfcepc0
ClippingMorph->PasteUpMorph. For reading in old BookMorphs.
conversionMethodsFor:
Each of these needs a conversion method. Hard part is the comment in it. Return a MessageSet.
convert1:to:allVarMaps:
Go through the normal instance conversion process and return a modern object.
convert2:allVarMaps:
Go through the normal instance conversion process and return a modern object.
dropShadowMorphbosfces0
initKnownRenames
initShapeDicts
Initialize me.
instVarInfo:
Return the object to write on the outgoing file that contains the structure of each class we are about to write out. Must be an Array whose first element is 'class structure'. Its second element is a Dictionary of pairs of the form #Rectangle -> #(<classVersion> 'origin' 'corner').
layoutMorphbosfcepbbochvimol0
layoutMorphbosfcepcbbochvimol0
mapClass:
See if the old class named nm exists. If so, return it. If not, map it to a new class, and save the mapping in renamed.
mapClass:origName:
See if instances changed shape. If so, make a fake class for the old shape and return it. Remember the original class name.
moreObjects
Return true if there appears to be another object following this one on the file.
morphicEventtcbks0
morphicSoundEventtcbkss0
multiStringx0
multiSymbolx0
myMorphbosfce0
newMorphicEventts0
next
Really write three objects: (version, class structure, object). But only when called from the outside.
nextAndClose
Speedy way to grab one object. Only use when we are inside an object binary file. If used for the start of a SmartRefStream mixed code-and-object file, tell the user and then do the right thing.
nextPut:
Really write three objects: (version, class structure, object). But only when called from the outside. If any instance-specific classes are present, prepend their source code. byteStream will be in fileOut format.
You can see an analysis of which objects are written out by doing:
(SmartRefStream statsOfSubObjects: anObject)
(SmartRefStream tallyOfSubObjects: anObject)
(SmartRefStream subObjects: anObject ofClass: aClass)
nextPutObjOnly:
Really write three objects: (version, class structure, object). But only when called from the outside. Not in fileOut format. No class definitions will be written for instance-specific classes. Error if find one. (Use nextPut: instead)
noHeader
Signal that we've already dealt with the version and structure array, and are now reading objects.
objectFromStreamedRepresentation:
read:withClasses:
readInstance
Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Three cases for files from older versions of the system:
1) Class has not changed shape, read it straight.
2) Class has changed instance variables (or needs fixup). Call a particular method to do it.
3) There is a new class instead. Find it, call a particular method to read.
All classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change! See setStream:
readInstanceSize:clsname:refPosn:
The common code to read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Three cases for files from older versions of the system:
1) Class has not changed shape, read it straight.
2) Class has changed instance variables (or needs fixup). Call a particular method to do it.
3) There is a new class instead. Find it, call a particular method to read.
All classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change! See setStream:
readShortInst
Instance has just one byte of size. Class symbol is encoded in two bytes of file position. See readInstance.
readWordLike
Can be used by any class that is bits and not bytes (WordArray, Bitmap, SoundBuffer, etc).
recordImageSegment:
Besides the objects being written out, record the structure of instances inside the image segment we are writing out.
renamed
renamedConv
reshapedClassesIn:
Look for classes in the outPointer array that have changed shape. Make a fake class for the old shape. Return a dictionary mapping Fake classes to Real classes. Substitute fake classes for real ones in outPointers.
saveClassInstVars
Install the values of the instance variables of UniClasses.
classInstVars is an array of arrays (#Player3 (Player3 class's inst var
scripts) (Player3 class's inst var slotInfo) ...)
scanFrom:
During a code fileIn, we need to read in an object, and stash it in ScannedObject.
scannedObject
scannedObject:
setStream:
Initialize me.
setStream:reading:
Initialize me.
statsOfSubObjects:
storeInstVarsIn:from:
For instance variables with the same names, store them in the new instance. Values in variable-length part also. This is NOT the normal inst var transfer! See Object.readDataFrom:size:. This is for when inst var names have changed and some additional conversion is needed. Here we handle the unchanged vars.
streamedRepresentationOf:
structures
structures:
subObjects:ofClass:
superclasses
superclasses:
tallyOfSubObjects:
transparentColorrcc0
uniClasesDo:
Examine structures and execute the block with each instance-specific class
uniClassInstVarsRefs:
If some of the objects seen so far are instances UniClasses, check the UniClasses for extra class inst vars, and send them to the steam also. The new objects get added to (dummy references), where they will be noticed by the caller. They will wind up in the structures array and will be written on the disk by class.
Return all classes seen.
verifyStructure
Compare the incoming inst var name lists with the existing classes. Prepare tables that will help to restructure those who need it (renamed, reshaped, steady). If all superclasses are recorded in the file, only compare inst vars of this class, not of superclasses. They will get their turn.
versionSymbol:
Create the symbolic code (like a version number) for this class in some older version. First initials of all the inst vars, followed by the class version number. Returns a string, caller makes it into a compound selector.
worldMorphbosfcebbfgccpmcpbttloiairfidcuwhavcdsll0
writeClassRename:was:
Write a method that tells which modern class to map instances to.
writeClassRenameMethod:was:fromInstVars:
The class coming is unknown. Ask the user for the existing class it maps to. If got one, write a method, and restart the obj fileIn. If none, write a dummy method and get the user to complete it later.
writeConversionMethod:class:was:fromInstVars:to:
The method convertToCurrentVersion:refStream: was not found in newClass. Write a default conversion method for the author to modify.
writeConversionMethodIn:fromInstVars:to:renamedFrom:
The method convertToCurrentVersion:refStream: was not found in newClass. Write a default conversion method for the author to modify. If method exists, append new info into the end.
NSSmartRefStreamTest
A NSSmartRefStreamTest is xxxxxxxxx.
Instance Variables
nonEmpty: <Object>
stream: <Object>
nonEmpty
- xxxxx
stream
- xxxxx
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
nonEmptyStream
Must return non-empty stream positioned at its begining.
setUp
stream
Returns any stream.
testGlobal
NSTee
A NSTee is xxxxxxxxx.
Instance Variables
outputStream: <Object>
outputStream
- xxxxx
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
inputStream:outputStream:
next
outputStream
outputStream:
NSTeeTest
A NSTeeTest is xxxxxxxxx.
Instance Variables
testSimple
NSTextStream
A NSTextStream is xxxxxxxxx.
Instance Variables
collection: <Object>
position: <Object>
readLimit: <Object>
writeLimit: <Object>
collection
- xxxxx
position
- xxxxx
readLimit
- xxxxx
writeLimit
- xxxxx
applyAttribute:beginningAt:
contents
growTo:
anInteger is the required minimal new size of the collection
nextPut:
Appends anObject to the receiver's past sequence values. If the receiver's future sequence values is not empty, removes its first object. Returns anObject.
nextPutAll:
Enumerates the argument, adding each element to the receiver. Returns aCollection.
on:
position
Returns the number of element before the current position in the stream.
setPosition:
Required accessor to a variable. No need to check anything here because the check is done in #position:.
size
Returns an integer indicating the number of elements we can position into.
withAttribute:do:
withAttributes:do:
NSTextStreamTest
A NSTextStreamTest is xxxxxxxxx.
Instance Variables
example1:
example2
testAddStringToTextStream
It is possible to add a string into a TextStream.
This test verifies that the created text has text attributes for all its characters.
testExampleText1
self run: #testExampleText1
testExampleText2
a Text looses its attributes when it is reversed
testGeneral
should open a workspace with the specified elements (when code is not commented)
testGeneral2
should open a workspace with the specified elements (when code is not commented)
testTextStreamAdjacentRunsWithIdentitcalAttributes
This test verifies that adjacent runs with identical attributes are coalesced.
NSTranscripter
A NSTranscripter is xxxxxxxxx.
Instance Variables
frame: <Object>
para: <Object>
frame
- xxxxx
para
- xxxxx
black
clear
confirm:
Put up a yes/no menu with caption queryString. Answer true if the
response is yes, false if no. This is a modal question--the user must
respond yes or no.
emergencyEvaluator
endEntry
initInFrame:
newInFrame:
nextPut:
Appends anObject to the receiver's past sequence values. If the receiver's future sequence values is not empty, removes its first object.
readEvalPrint
request:
show:
startTranscriptProcess
white
NSTranscripterTest
A NSTranscripterTest is xxxxxxxxx.
Instance Variables
nonEmpty: <Object>
stream: <Object>
nonEmpty
- xxxxx
stream
- xxxxx
elementToBePut
Returns an element that can be added to the streams returned by #stream and #nonEmptyStream.
nonEmptyStream
setUp
stream
Returns any stream.
testEmergencyEvaluator
running this test should open a window with some indications
NSZLibReadStream
A NSZLibReadStream is xxxxxxxxx.
Instance Variables
on:from:to:
Check the header of the ZLib stream.
updateCrc:from:to:in:
Answer an updated CRC for the range of bytes in aCollection
verifyCrc
Verify the crc checksum in the input
NSZLibWriteStream
A NSZLibWriteStream is xxxxxxxxx.
Instance Variables
on:
writeFooter
Store the Adler32 checksum as the last 4 bytes.
writeHeader
Write header information
NSZipEncoder
A NSZipEncoder is xxxxxxxxx.
Instance Variables
bitBuffer: <Object>
bitPosition: <Object>
collection: <Object>
encodedStream: <Object>
position: <Object>
readLimit: <Object>
writeLimit: <Object>
bitBuffer
- xxxxx
bitPosition
- xxxxx
collection
- xxxxx
encodedStream
- xxxxx
position
- xxxxx
readLimit
- xxxxx
writeLimit
- xxxxx
bitPosition
close
commit
encodedStream
flush
flushBits
Flush currently unsent bits
nextBits:put:
Store a value of nBits
nextBytePut:
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.
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.
on:
pastEndPut:
Flush the current buffer and store the new object at the beginning
privateSendBlock:with:with:with:
Send the current block using the encodings from the given literal/length and distance tree
sendBlock:with:with:with:
Send the current block using the encodings from the given literal/length and distance tree
NSZipReadStream
A NSZipReadStream is xxxxxxxxx.
Instance Variables
expectedCrc: <Object>
expectedCrc
- xxxxx
expectedCrc:
If expectedCrc is set, it will be compared against the calculated CRC32 in verifyCrc.
This number should be the number read from the Zip header (which is the bitwise complement of my crc if all is working correctly)
on:from:to:
updateCrc:from:to:in:
Answer an updated CRC for the range of bytes in aCollection.
Subclasses can implement the appropriate means for the check sum they wish to use.
verifyCrc
Verify the CRC-32 checksum calculated from the input against the expected CRC-32, if any.
Answer the calculated CRC-32 in any case.
Note that the CRC-32 used in Zip files is actually the bit inverse of the calculated value, so that is what is returned.
NSZipWriteStream
A NSZipWriteStream is xxxxxxxxx.
Instance Variables
writeFooter
Write footer information if necessary
writeHeader
Write header information if necessary
OpenFileStreamRegistry
This class remember all Stream open in a WeekRegistry.
Then when you forgot to close a Stream and open a FileStream on the same File and couuldn't open it, it garbage collected and reopen the File.
add:
current
initialize
Subclasses should redefine this method to perform initializations on instance creation
keys
new
registry
remove:
NSTInflateBitAccess
A NSTInflateBitAccess is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
bitBuff
bitBuff:
bitPos
bitPos:
bitPosition
Return the current bit position of the source
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
nextBits:
nextByte
nextSingleBits:
Fetch the bits all at once
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
source
sourcePos
sourcePos:
sourceStream
variablesAndOffsetsDo:
NSTHuffmanTrees
A NSTHuffmanTrees is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
computeHuffmanValues:counts:from:to:
Assign numerical values to all codes.
Note: The values are stored according to the bit length
copy
createHuffmanTables:counts:from:to:
Create the actual tables
decodeDynamicTable:from:
Decode the code length of the literal/length and distance table
in a block compressed with dynamic huffman trees
decodeValueFrom:
defaultEnvironment
distanceMap
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
growHuffmanTable:
hasClassTrait
huffmanTableFrom:mappedBy:
Create a new huffman table from the given code lengths.
Map the actual values by valueMap if it is given.
See the class comment for a documentation of the huffman
tables used in this decompressor.
includesBehavior:
increment:bits:
Increment value in reverse bit order, e.g.
for a 3 bit value count as follows:
000 / 100 / 010 / 110
001 / 101 / 011 / 111
See the class comment why we need this.
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
literalLengthMap
mapValues:by:
maxBits
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
nextBits:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
NSTDeflating
A NSTDeflating is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
blockPosition
blockPosition:
blockStart
blockStart:
classDefinitions
classTrait
classTrait:
collection
compare:with:min:
Compare the two strings and return the length of matching characters.
minLength is a lower bound for match lengths that will be accepted.
Note: here and matchPos are zero based.
copy
defaultEnvironment
deflateBlock
Deflate the current contents of the stream
deflateBlock:chainLength:goodMatch:
Continue deflating the receiver's collection from blockPosition to lastIndex.
Note that lastIndex must be at least MaxMatch away from the end of collection
encodeLiteral:
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
findMatch:lastLength:lastMatch:chainLength:goodMatch:
Find the longest match for the string starting at here.
If there is no match longer than lastLength return lastMatch/lastLength.
Traverse at most maxChainLength entries in the hash table.
Stop if a match of at least goodMatch size has been found.
flushBlock
goodMatchLength
hasClassTrait
hashChainLength
hashHead
hashMask
hashShift
hashTail
hashValue
hashValue:
includesBehavior:
initialize
insertStringAt:
Insert the string at the given start position into the hash table.
Note: The hash value is updated starting at MinMatch-1 since
all strings before have already been inserted into the hash table
(and the hash value is updated as well).
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
maxDistance
maxMatch
minMatch
moveContentsToFront
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
position
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
updateHash:
Update the running hash value based on the next input byte.
Return the new updated hash value.
updateHashAt:
Update the hash value at position here (one based)
validateMatchAt:from:to:
variablesAndOffsetsDo:
windowMask
writeLimit
NSTInflating
A NSTInflating is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
bitBuf
bitBuf:
bitPos
bitPos:
blockProceedBit
classDefinitions
classTrait
classTrait:
collection
copy
decodeDynamicTable:from:
decodeValueFrom:
Decode the next value in the receiver using the given huffman table.
decompressBlock:with:
Process the compressed data in the block.
llTable is the huffman table for literal/length codes
and dTable is the huffman table for distance codes.
defaultEnvironment
distTable
distTable:
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
fixedDistTable
fixedLitTable
hasClassTrait
huffmanTableFrom:mappedBy:
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
litTable
litTable:
literalLengthMap
maxBits
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
nextBits:
nextSingleBits:
obsolete
proceedDynamicBlock
proceedFixedBlock
proceedStoredBlock
Proceed decompressing a stored (e.g., uncompressed) block
processDynamicBlock
processFixedBlock
processStoredBlock
Skip to byte boundary
readLimit
readLimit:
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
sourceLimit
sourcePos
sourcePos:
state
state:
stateNoMoreData
variablesAndOffsetsDo:
NSTWriteData
A NSTWriteData is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
byteStream
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
writeArray:
PRIVATE -- Write the contents of an Array.
writeBitmap:
PRIVATE -- Write the contents of a Bitmap.
writeBoolean:
PRIVATE -- Write the contents of a Boolean.
This method is now obsolete.
writeByteArray:
PRIVATE -- Write the contents of a ByteArray.
writeClass:
Write out a DiskProxy for the class. It will look up the class's name in Smalltalk in the new sustem. Never write classes or methodDictionaries as objects. For novel classes, front part of file is a fileIn of the new class.
writeFalse:
PRIVATE -- Write the contents of a False.
writeFloat:
PRIVATE -- Write the contents of a Float.
We support 8-byte Floats here.
writeFloatString:
PRIVATE -- Write the contents of a Float string.
This is the slow way to write a Float--via its string rep'n.
writeInstance:
PRIVATE -- Write the contents of an arbitrary instance.
writeInteger:
PRIVATE -- Write the contents of a SmallInteger.
writeNil:
PRIVATE -- Write the contents of an UndefinedObject.
writeRectangle:
Write the contents of a Rectangle. See if it can be a compact Rectangle (type=15). Rectangles with values outside +/- 2047 were stored as normal objects (type=9). 17:22 tk
writeString:
PRIVATE -- Write the contents of a String.
writeStringOld:
PRIVATE -- Write the contents of a String.
writeSymbol:
PRIVATE -- Write the contents of a Symbol.
writeTrue:
PRIVATE -- Write the contents of a True.
writeUser:
Write the contents of an arbitrary User instance (and its devoted class).
writeWordLike:
Note that we put the class name before the size.
NSTReadData
A NSTReadData is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
beginReference:
We're starting to read anObject. Remember it and its reference
position (if we care; ReferenceStream cares). Answer the
reference position.
binding
byteStream
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
getCurrentReference
PRIVATE -- Return the currentReference posn.
Overridden by ReferenceStream.
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
next
Answer the next object in the stream.
objectAt:
PRIVATE -- Read & return the object at a given stream position. 08:18 tk anInteger is a relative file position.
obsolete
readArray
PRIVATE -- Read the contents of an Array.
We must do beginReference: here after instantiating the Array
but before reading its contents, in case the contents reference
the Array. beginReference: will be sent again when we return to
next, but that's ok as long as we save and restore the current
reference position over recursive calls to next.
readBitmap
PRIVATE -- Read the contents of a Bitmap.
readBoolean
PRIVATE -- Read the contents of a Boolean.
This is here only for compatibility with old data files.
readByteArray
PRIVATE -- Read the contents of a ByteArray.
readClass
Should never be executed because a DiskProxy, not a clas comes in.
readFalse
PRIVATE -- Read the contents of a False.
readFloat
PRIVATE -- Read the contents of a Float.
This is the fast way to read a Float.
We support 8-byte Floats here. Non-IEEE
readFloatString
PRIVATE -- Read the contents of a Float string.
This is the slow way to read a Float--via its string rep'n.
It's here for compatibility with old data files.
readInstance
PRIVATE -- Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data.
readInteger
PRIVATE -- Read the contents of a SmallInteger.
readMethod
PRIVATE -- Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data.
readNil
PRIVATE -- Read the contents of an UndefinedObject.
readRectangle
Read a compact Rectangle. Rectangles with values outside +/- 2047 were stored as normal objects (type=9). They will not come here. 17:22 tk
readReference
Read the contents of an object reference. (Cf. outputReference:) File is not now positioned at this object.
readShortInst
Read the contents of an arbitrary instance that has a short header.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data.
readShortRef
Read an object reference from two bytes only. Original object must be in first 65536 bytes of the file. Relative to start of data. vacantRef not a possibility.
readString
readStringOld
readSymbol
PRIVATE -- Read the contents of a Symbol.
readTrue
PRIVATE -- Read the contents of a True.
readUser
Reconstruct both the private class and the instance. Still used??
readWordArray
PRIVATE -- Read the contents of a WordArray.
readWordArrayForSegment
Read the contents of a WordArray ignoring endianness.
readWordLike
Can be used by any class that is bits and not bytes (WordArray, Bitmap, SoundBuffer, etc).
removeFromSystem
removeFromSystem:
rename:
requirements
setCurrentReference:
PRIVATE -- Set currentReference to refPosn.
Noop here. Cf. ReferenceStream.
setName:andRegisterInCategory:environment:
vacantRef
Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference
position' to identify a reference that's not yet filled in. This must be a
value that won't be used as an ordinary reference. Cf. outputReference: and
readReference. --
NOTE: We could use a different type ID for vacant-refs rather than writing
object-references with a magic value. (The type ID and value are
overwritten by ordinary object-references when weak refs are fullfilled.)
variablesAndOffsetsDo:
NSTDataStream
A NSTDataStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
atEnd
Answer true if the stream is at the end.
baseTrait
basicCategory
basicCategory:
binding
byteStream
classDefinitions
classTrait
classTrait:
close
Close the stream.
contents
copy
defaultEnvironment
environment
environment:
errorWriteReference:
PRIVATE -- Raise an error because this case of nextPut:'s perform:
shouldn't be called. -- 11/15/92 jhm
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
flush
Guarantee that any writes to me are actually recorded on disk. -- 11/17/92 jhm
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
outputReference:
PRIVATE -- Output a reference to the object at integer stream position referencePosn (relative to basePos). To output a weak reference to an object not yet written, supply (self vacantRef) for referencePosn.
removeFromSystem
removeFromSystem:
rename:
requirements
reset
Reset the stream.
setName:andRegisterInCategory:environment:
size
Answer the stream's size.
variablesAndOffsetsDo:
NSTWritingChunks
A NSTWritingChunks is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
copyMethodChunkFrom:
Copy the next chunk from aStream (must be different from the receiver).
copyMethodChunkFrom:at:
Copy the next chunk from aStream (must be different from the receiver).
copyPreamble:from:at:
Look for a changeStamp for this method by peeking backward.
Write a method preamble, with that stamp if found.
cr
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
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[.
nextPut:
nextPutAll:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
timeStamp
Append the current time to the receiver as a String.
variablesAndOffsetsDo:
NSTReadingChunks
A NSTReadingChunks is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
atEnd
back
backChunk
Answer the contents of the receiver back to the previous terminator character. Doubled terminators indicate an embedded terminator character.
baseTrait
basicCategory
basicCategory:
basicNextChunk
Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character.
binding
classDefinitions
classTrait
classTrait:
copy
decodeString:andRuns:
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
next
nextChunk
Answer the contents of the receiver, up to the next terminator character. Doubled terminators indicate an embedded terminator character.
nextChunkText
Deliver the next chunk as a Text. Decode the following ]style[ chunk if present. Position at start of next real chunk.
obsolete
oldBack
Go back one element and return it. Use indirect messages in case I am a StandardFileStream
oldPeekBack
Return the element at the previous position, without changing position. Use indirect messages in case self is a StandardFileStream.
parseLangTagFor:
peek
position
position:
positionError
Since I am not necessarily writable, it is up to my subclasses to override
position: if expanding the collection is preferrable to giving this error.
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
skipSeparators
skipSeparatorsAndPeekNext
A special function to make nextChunk fast
skipStyleChunk
Get to the start of the next chunk that is not a style for the previous chunk
upTo:
variablesAndOffsetsDo:
NSTFileOut
A NSTFileOut is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binary
switch to binary mode
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
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
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
header
If the stream requires a standard header, override this message. See HtmlFileStream
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setFileTypeToObject
On the Macintosh, set the file type and creator of this file to be a Squeak object file. On other platforms, do nothing. Setting the file type allows Squeak object files to be sent as email attachments and launched by double-clicking. On other platforms, similar behavior is achieved by creating the file with the '.sqo' file name extension.
setName:andRegisterInCategory:environment:
trailer
If the stream requires a standard trailer, override this message. See HtmlFileStream
variablesAndOffsetsDo:
NSTFileIn
A NSTFileIn is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
checkForPreamble:
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileIn
This is special for reading expressions from text that has been formatted
with exclamation delimitors. The expressions are read and passed to the
Compiler. Answer the result of compilation.
fileInAnnouncing:
This is special for reading expressions from text that has been formatted
with exclamation delimitors. The expressions are read and passed to the
Compiler. Answer the result of compilation. Put up a progress report with
the given announcement as the title.
fileInFor:announcing:
This is special for reading expressions from text that has been formatted
with exclamation delimitors. The expressions are read and passed to the
Compiler. Answer the result of compilation. Put up a progress report with
the given announcement as the title.
Does NOT handle preambles or postscripts specially.
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?
fileInSilentlyAnnouncing:
This is special for reading expressions from text that has been formatted
with exclamation delimitors. The expressions are read and passed to the
Compiler. Answer the result of compilation. Put up a progress report with
the given announcement as the title.
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
peek
peekFor:
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
size
text
switch to text mode
variablesAndOffsetsDo:
NSTInflateStream
A NSTInflateStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
close
Disassociate a stream from its backing store. Does nothing by default. Streams over files for example will have to close the file in this method.
collection
contents
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isEmpty
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
next
Reads the next object in the stream and returns it. Please ensure that the stream is not at its end before calling #next. Behavior is not defined if the stream is at its end.
next:into:startingAt:
Read n objects into the given collection.
Return aCollection or a partial copy if less than
n elements have been read.
obsolete
pastEndRead
peek
Returns the next object in the receiver's future sequence values without advancing the receiver's position. Returns nil if the receiver is at end of stream.
position
position:
readLimit
removeFromSystem
removeFromSystem:
rename:
requirements
reset
Resets the position of the receiver to be at the start of the stream.
setName:andRegisterInCategory:environment:
setPosition:
sourceStream
state
upTo:
Returns a collection of all of the objects in the receiver up to, but not including, the next occurrence ofthe argument. Sets the stream to read the object just after the next occurrence of the argument. If the argument is not found and the end of the stream is encountered, an ordered collection of the objects read is returned.
upToEnd
Answers remaining elements. Position the stream to its end.
variablesAndOffsetsDo: