My instances are similar to strings in that they are both represented as
a sequence of bytes, but my individual elements are integers, where as
a String's elements are characters.
Answer a ByteArray containing anInteger bytes starting at the location pointed
to by aCObject
1.14.2 ByteArray: built ins
asCData: aCType
Convert the receiver to a CObject with the given type
byteAt: index
Answer the index-th indexed instance variable of the receiver
byteAt: index put: value
Store the `value' byte in the index-th indexed instance variable
of the receiver
hash
Answer an hash value for the receiver
primReplaceFrom: start to: stop with: aByteArray startingAt: srcIndex
Private - Replace the characters from start to stop with the
ASCII codes contained in aString (which, actually, can be
any variable byte class), starting at the srcIndex location of
aString
replaceFrom: start to: stop with: aByteArray startingAt: replaceStart
Replace the characters from start to stop with the
bytes contained in aByteArray (which, actually, can be
any variable byte class), starting at the replaceStart
location of aByteArray
replaceFrom: start to: stop withString: aString startingAt: replaceStart
Replace the characters from start to stop with the
ASCII codes contained in aString (which, actually, can be
any variable byte class), starting at the replaceStart
location of aString
1.14.3 ByteArray: converting
asString
Answer a String whose character's ASCII codes are the receiver's contents
asUnicodeString
Answer a UnicodeString whose character's codes are the receiver's contents.
This is not implemented unless you load the I18N package.
1.14.4 ByteArray: more advanced accessing
charAt: index
Access the C char at the given index in the receiver. The value is
returned as a Smalltalk Character.
Indices are 1-based just like for other Smalltalk access.
charAt: index put: value
Store as a C char the Smalltalk Character or Integer object
identified by `value', at the given index in the receiver, using
sizeof(char) bytes - i.e. 1 byte.
Indices are 1-based just like for other Smalltalk access.
doubleAt: index
Access the C double at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
doubleAt: index put: value
Store the Smalltalk Float object identified by `value', at the
given index in the receiver, writing it like a C double.
Indices are 1-based just like for other Smalltalk access.
floatAt: index
Access the C float at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
floatAt: index put: value
Store the Smalltalk Float object identified by `value', at the
given index in the receiver, writing it like a C float.
Indices are 1-based just like for other Smalltalk access.
intAt: index
Access the C int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
intAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(int) bytes.
Indices are 1-based just like for other Smalltalk access.
longAt: index
Access the C long int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
longAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(long) bytes.
Indices are 1-based just like for other Smalltalk access.
longDoubleAt: index
Access the C long double at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
longDoubleAt: index put: value
Store the Smalltalk Float object identified by `value', at the
given index in the receiver, writing it like a C double.
Indices are 1-based just like for other Smalltalk access.
objectAt: index
Access the Smalltalk object (OOP) at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
objectAt: index put: value
Store a pointer (OOP) to the Smalltalk object identified by `value',
at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
shortAt: index
Access the C short int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
shortAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(short) bytes.
Indices are 1-based just like for other Smalltalk access.
stringAt: index
Access the string pointed by the C `char *' at the given index in the
receiver. Indices are 1-based just like for other Smalltalk access.
stringAt: index put: value
Store the Smalltalk String object identified by `value', at the
given index in the receiver, writing it like a *FRESHLY
ALLOCATED* C string. It is the caller's responsibility to free
it if necessary.
Indices are 1-based just like for other Smalltalk access.
ucharAt: index
Access the C unsigned char at the given index in the receiver.
The value is returned as a Smalltalk Character.
Indices are 1-based just like for other Smalltalk access.
ucharAt: index put: value
Store as a C char the Smalltalk Character or Integer object
identified by `value', at the given index in the receiver, using
sizeof(char) bytes - i.e. 1 byte.
Indices are 1-based just like for other Smalltalk access.
uintAt: index
Access the C unsigned int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
uintAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(int) bytes.
Indices are 1-based just like for other Smalltalk access.
ulongAt: index
Access the C unsigned long int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
ulongAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(long) bytes.
Indices are 1-based just like for other Smalltalk access.
unsignedCharAt: index
Access the C unsigned char at the given index in the receiver.
The value is returned as a Smalltalk Character.
Indices are 1-based just like for other Smalltalk access.
unsignedCharAt: index put: value
Store as a C char the Smalltalk Character or Integer object
identified by `value', at the given index in the receiver, using
sizeof(char) bytes - i.e. 1 byte.
Indices are 1-based just like for other Smalltalk access.
unsignedIntAt: index
Access the C unsigned int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
unsignedIntAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(int) bytes.
Indices are 1-based just like for other Smalltalk access.
unsignedLongAt: index
Access the C unsigned long int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
unsignedLongAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(long) bytes.
Indices are 1-based just like for other Smalltalk access.
unsignedShortAt: index
Access the C unsigned short int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
unsignedShortAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(short) bytes.
Indices are 1-based just like for other Smalltalk access.
ushortAt: index
Access the C unsigned short int at the given index in the receiver.
Indices are 1-based just like for other Smalltalk access.
ushortAt: index put: value
Store the Smalltalk Integer object identified by `value', at the
given index in the receiver, using sizeof(short) bytes.
Indices are 1-based just like for other Smalltalk access.
1.14.5 ByteArray: storing
isLiteralObject
Answer whether the receiver is expressible as a Smalltalk literal.
storeLiteralOn: aStream
Put a Smalltalk literal evaluating to the receiver on aStream.
storeOn: aStream
Put Smalltalk code evaluating to the receiver on aStream.
This document was generated
on May, 22 2008
using texi2html