Nile-Base

NSByteStream
A NSByteStream is xxxxxxxxx.
Instance Variables
isBinary
NSCollectionLimiter
A NSCollectionLimiter is xxxxxxxxx.
Instance Variables
collection: <Object>
lowerBound: <Object>
upperBound: <Object>
collection
- xxxxx
lowerBound
- xxxxx
upperBound
- xxxxx
at:
Primitive. Assumes receiver is indexable. Answer the value of an
indexable element in the receiver. Fail if the argument index is not an
Integer or is out of bounds. Essential. See Object documentation
whatIsAPrimitive.
at:put:
Primitive. Assumes receiver is indexable. Store the argument value in
the indexable element of the receiver indicated by index. Fail if the
index is not an Integer or is out of bounds. Or fail if the value is not of
the right type for this kind of collection. Answer the value that was
stored. Essential. See Object documentation whatIsAPrimitive.
indexFor:
on:from:to:
setCollection:lowerBound:upperBound:
size
Answer how many elements the receiver contains.
NSCollectionStream
Basically, I'm iterating over collections. I can help you read and write on collections.
Instance variables:
- collection: the collection on which I'm iterating. The collection can change if it's becoming too small to put all the data.
- position: integer which reminds the current position of the stream in the collection. It *must* be interpreted as being between 2 elements. 0 corresponds to the begining of the stream, before all elements. 1 corresponds to the position between the first and the second element and so on.
- streamSize: integer to know where the real information stops in the collection. The value is always between 0 and the size of the collection. For example: the streamSize of "NSCollectionStream ignoringElementsOf: (String new: 10)" is 0 whereas the collection size is 10.
collection
contents
Return a collection containing the complete contents of the stream.
freeSpace
Returns the number of elements that can be written to the stream before the end of the collection
hasRoomFor:
Verifies there is enough free space in the collection to write anInteger elements at the current position.
ignoringElementsOf:
makeRoomFor:
Make the collection bigger to be able to write anInteger elements after the current position.
new
next
Reads the next object in the stream and returns it.
next:
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:
on:
on:from:to:
originalContents
Return a collection containing the complete contents of the stream without copying it.
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.
position
resetContents
setCollection:
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.
streamSize:
with:
writeAllElementsOf:
NSDecoder
A NSDecoder is xxxxxxxxx.
Instance Variables
atEnd: <Object>
inputStream: <Object>
nextValue: <Object>
atEnd
- xxxxx
inputStream
- xxxxx
nextValue
- xxxxx
atEnd
atEnd:
inputStream
inputStream:
nextValue
nextValue:
outputCollectionClass
NSError
A NSError is xxxxxxxxx.
Instance Variables
NSInvalidArgumentError
A NSInvalidArgumentError is xxxxxxxxx.
Instance Variables
NSNoMoreElementError
A NSNoMoreElementError is xxxxxxxxx.
Instance Variables
NSPluggableDecoder
A NSPluggableDecoder is xxxxxxxxx.
Instance Variables
decoderBlock: <Object>
decoderBlock
- xxxxx
decoderBlock
decoderBlock:
decoderBlock:inputStream:
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only.
NSPositionError
A NSPositionError is xxxxxxxxx.
Instance Variables
NSStreamAtEndError
A NSStreamAtEndError is xxxxxxxxx.
Instance Variables
NSStreamAtStartError
A NSStreamAtStartError is xxxxxxxxx.
Instance Variables
NSStreamCreationError
A NSStreamCreationError is xxxxxxxxx.
Instance Variables
NSStringStream
Same as NSCollectionStream, but with optimizations for strings
atEnd
Answers true if and only if there is no more element to read.
initialize
Subclasses should redefine this method to perform initializations on instance creation
next
Reads the next object in the stream and returns it.
next:
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:
outputCollectionClass
NSTByteReading
A NSTByteReading is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
boolean
Answer the next boolean value from this (binary) stream.
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
int16
Answer the next signed, 16-bit integer from this (binary) stream.
int32
Answer the next signed, 32-bit integer from this (binary) stream.
isBaseTrait
isBinary
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
next
next:
nextBoolean
Answer the next boolean value from this (binary) stream.
nextInt32
Read a 32-bit signed integer from the next 4 bytes
nextInto:
nextLittleEndianNumber:
Answer the next n bytes as a positive Integer or LargePositiveInteger, where the bytes are ordered from least significant to most significant.
nextNumber:
Answer the next n bytes as a positive Integer or LargePositiveInteger.
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.
nextWord
Answer the next two bytes from the receiver as an Integer.
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
string
Answer the next string from this (binary) stream.
uint16
Answer the next unsigned, 16-bit integer from this (binary) stream.
uint24
Answer the next unsigned, 24-bit integer from this (binary) stream.
uint32
Answer the next unsigned, 32-bit integer from this (binary) stream.
variablesAndOffsetsDo:
NSTByteWriting
A NSTByteWriting is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
boolean:
Store the given boolean value on this (binary) stream.
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
int16:
Store the given signed, 16-bit integer on this (binary) stream.
int32:
Store the given signed, 32-bit integer on this (binary) stream.
isBaseTrait
isBinary
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
nextInt32Put:
Write a signed integer to the next 4 bytes
nextLittleEndianNumber:put:
Writes value in the following n bytes of the stream where the bytes are ordered from least significant to most significant.
nextNumber:put:
Append to the receiver the argument, v, which is a positive
SmallInteger or a LargePositiveInteger, as the next n bytes.
Possibly pad with leading zeros.
nextPut:
nextPutAll:
nextStringPut:
Append the string, s, to the receiver. Only used by DataStream. Max size of 64*256*256*256.
nextWordPut:
Append to the receiver an Integer as the next two bytes.
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
string:
Store the given string on this (binary) stream. The string must contain 65535 or fewer characters.
uint16:
Store the given unsigned, 16-bit integer on this (binary) stream.
uint24:
Store the given unsigned, 24-bit integer on this (binary) stream.
uint32:
Store the given unsigned, 32-bit integer on this (binary) stream.
variablesAndOffsetsDo:
NSTCharacterReading
A NSTCharacterReading is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
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:
nextLine
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
skipSeparators
variablesAndOffsetsDo:
NSTCharacterWriting
A NSTCharacterWriting is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
cr
cr:
crtab
crtab:
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:
nextPut:
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
space
space:
tab
tab:
variablesAndOffsetsDo:
NSTDecoder
A NSTDecoder is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
atEnd:
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
effectiveNext
Reads the input stream and returns a computed value based on it. For private use only. Please read the comment of NSTDecoder.
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
initializeDecoder
Initialize the decoder. See comment in NSTDecoder. The class using this trait must call this method before being useable.
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
next
nextValue
nextValue:
obsolete
peek
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
NSTGettablePositionableStream
A NSTGettablePositionableStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
back
Goes back one position in the stream and returns the new next element.
backUpTo:
baseTrait
basicBack
Goes back one position in the stream.
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
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.
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
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.
obsolete
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
skip:
Moves relatively in the stream. Go forward amount elements. Go backward if amount is negative.
variablesAndOffsetsDo:
NSTGettableStream
A NSTGettableStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
atEnd
Returns a boolean indicating whether the receiver is at the end of its values (no more entry to read).
baseTrait
basicCategory
basicCategory:
basicNext
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
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.
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
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.
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.
nextMatchFor:
Reads the next object from the stream and returns true if the object is equal to the argument and false otherwise.
obsolete
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.
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.
removeFromSystem
removeFromSystem:
rename:
requirements
select:
Returns a new stream which contains a selection of elements in the receiver. All elements of the receiver are passed to aBlock. This is really like Collection>>select:.
setName:andRegisterInCategory:environment:
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.
skipTo:
Sets the stream to read the object just after the next occurence of the argument and returns true. If the argument is not found before the end of the stream is encountered, false is returned.
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.
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.
variablesAndOffsetsDo:
NSTPositionableStream
A NSTPositionableStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
atEnd
Answers true if and only if there is no more element to read.
atStart
Answers true if and only if there is no element to read before the current position.
back
Goes back one position in the stream.
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
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.
isInBounds:
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
obsolete
position
Returns the number of element before the current position in the stream.
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.
removeFromSystem
removeFromSystem:
rename:
requirements
reset
Resets the position of the receiver to be at the start of the stream.
setName:andRegisterInCategory:environment:
setPosition:
Required accessor to a variable. No need to check anything here because the check is done in #position:.
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.
variablesAndOffsetsDo:
NSTPuttablePositionableStream
A NSTPuttablePositionableStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
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:
writeBack:
NSTPuttableStream
A NSTPuttableStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
basicNextPut:
basicNextPutAll:
binding
classDefinitions
classTrait
classTrait:
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
flush
Ensure the backing store is updated. Default implementation does nothing.
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isClassTrait
isObsolete
isValidTraitName:
name
name:
name:traitComposition:methodDict:localSelectors:organization:
named:uses:category:
named:uses:category:env:
new
newTemplateIn:
next:put:
Stores anObject as the next anInteger number of elements. Answer anObject.
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.
obsolete
print:
Asks the object to print itself on the receiver.
removeFromSystem
removeFromSystem:
rename:
requirements
setName:andRegisterInCategory:environment:
variablesAndOffsetsDo:
NSTStream
A NSTStream is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binary
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.
closed
copy
defaultEnvironment
environment
environment:
fileOutOn:moveSource:toFile:
fileOutOn:moveSource:toFile:initializing:
hasClassTrait
includesBehavior:
initialize
isBaseTrait
isBinary
isClassTrait
isClosed
isObsolete
isStream
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:
NSTUpdateAdler32
A NSTUpdateAdler32 is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
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:
updateAdler32:from:to:in:
Update crc using the Adler32 checksum technique from RFC1950
updateCrc:from:to:in:
Answer an updated CRC for the range of bytes in aCollection
variablesAndOffsetsDo:
NSTUpdateCrc
A NSTUpdateCrc is xxxxxxxxx.
applyChangesOfNewTraitCompositionReplacing:
asClassDefinition
asClassSideNode
asNode
baseTrait
basicCategory
basicCategory:
binding
classDefinitions
classTrait
classTrait:
copy
crcTable
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:
updateCrc:from:to:in:
variablesAndOffsetsDo: