Inherits from NSObject
Conforms to ISFSArray
Declared in SFSArray.h
SFSArray.m

Overview

SFSArray is used from both server and client sides to exchange data. It can be thought of a specialized Array/List object that can contain any type of data.

The advantage of using SFSArray is that you can fine tune the way your data will be transmitted over the network. For instance, a number like 100 can be transmitted as a normal integer (which takes 32 bits) but also a short (16 bit) or even a byte (8 bit)

SFSArray supports many primitive data types and related arrays of primitives. It also allows to serialize class instances and rebuild them on the Java side. This is explained in greater detail in a separate document.

See ISFSArray, SFSObject

Tasks

Class Methods

newFromArray:

Alternative static constructor that builds an SFSArray populated with the data found in the passed Array

+ (SFSArray *)newFromArray:(NSArray *)arr

Discussion

Alternative static constructor that builds an SFSArray populated with the data found in the passed Array

Declared In

SFSArray.h

newFromBinaryData:

Alternative static constructor that builds an SFSArray from a valid SFSArray binary representation

+ (SFSArray *)newFromBinaryData:(NSData *)data

Discussion

Alternative static constructor that builds an SFSArray from a valid SFSArray binary representation

Declared In

SFSArray.h

newInstance

Alternative static constructor

+ (SFSArray *)newInstance

Discussion

Alternative static constructor

Declared In

SFSArray.h

Instance Methods

add:

- (void)add:(SFSDataWrapper *)wrappedObject

Discussion

Declared In

SFSArray.h

addBool:

Add a Boolean value

- (void)addBool:(BOOL)value

Discussion

Add a Boolean value

Declared In

SFSArray.h

addBoolArray:

Add an array of Booleans

- (void)addBoolArray:(NSArray *)value

Discussion

Add an array of Booleans

Declared In

SFSArray.h

addByte:

Add a byte value (8 bit)

- (void)addByte:(NSInteger)value

Discussion

Add a byte value (8 bit)

Declared In

SFSArray.h

addByteArray:

Add an array of bytes

- (void)addByteArray:(NSData *)value

Discussion

Add an array of bytes

Declared In

SFSArray.h

addDouble:

Add a dobule value (64 bit)

- (void)addDouble:(NSNumber *)value

Discussion

Add a dobule value (64 bit)

Declared In

SFSArray.h

addDoubleArray:

Add an array of doubles

- (void)addDoubleArray:(NSArray *)value

Discussion

Add an array of doubles

Declared In

SFSArray.h

addFloat:

Add a float value (32 bit)

- (void)addFloat:(NSNumber *)value

Discussion

Add a float value (32 bit)

Declared In

SFSArray.h

addFloatArray:

Add an array of floats

- (void)addFloatArray:(NSArray *)value

Discussion

Add an array of floats

Declared In

SFSArray.h

addInt:

Add an int value (32 bit)

- (void)addInt:(NSInteger)value

Discussion

Add an int value (32 bit)

Declared In

SFSArray.h

addIntArray:

Add an array of ints

- (void)addIntArray:(NSArray *)value

Discussion

Add an array of ints

Declared In

SFSArray.h

addLong:

Add a long int value (64 bit)

- (void)addLong:(NSNumber *)value

Discussion

Add a long int value (64 bit)

Declared In

SFSArray.h

addLongArray:

Add an array of long ints

- (void)addLongArray:(NSArray *)value

Discussion

Add an array of long ints

Declared In

SFSArray.h

addNull

Add a null element

- (void)addNull

Discussion

Add a null element

Declared In

SFSArray.h

addSFSArray:

Add an SFSArray

- (void)addSFSArray:(id<ISFSArray>)value

Discussion

Add an SFSArray

Declared In

SFSArray.h

addSFSObject:

Add an SFSObject

- (void)addSFSObject:(id<ISFSObject>)value

Discussion

Add an SFSObject

See Also

Declared In

SFSArray.h

addShort:

Add a short int value (16 bit)

- (void)addShort:(NSInteger)value

Discussion

Add a short int value (16 bit)

Declared In

SFSArray.h

addShortArray:

Add an array of short ints

- (void)addShortArray:(NSArray *)value

Discussion

Add an array of short ints

Declared In

SFSArray.h

addUtfString:

Add a UTF-8 String

- (void)addUtfString:(NSString *)value

Discussion

Add a UTF-8 String

Declared In

SFSArray.h

addUtfStringArray:

Add an array of UTF-8 String

- (void)addUtfStringArray:(NSArray *)value

Discussion

Add an array of UTF-8 String

Declared In

SFSArray.h

contains:

Returns true if the passed object is contained in the Array

- (BOOL)contains:(id)obj

Discussion

Returns true if the passed object is contained in the Array

Declared In

SFSArray.h

getBool:

Get a Boolean element at the provided index

- (BOOL)getBool:(NSInteger)index

Discussion

Get a Boolean element at the provided index

Declared In

SFSArray.h

getBoolArray:

Get a Boolean Array element at the provided index

- (NSArray *)getBoolArray:(NSInteger)index

Discussion

Get a Boolean Array element at the provided index

Declared In

SFSArray.h

getByte:

Get a byte element at the provided index

- (NSInteger)getByte:(NSInteger)index

Discussion

Get a byte element at the provided index

Declared In

SFSArray.h

getByteArray:

Get a byte Array element at the provided index

- (NSData *)getByteArray:(NSInteger)index

Discussion

Get a byte Array element at the provided index

Declared In

SFSArray.h

getDouble:

Get a double element at the provided index

- (NSNumber *)getDouble:(NSInteger)index

Discussion

Get a double element at the provided index

Declared In

SFSArray.h

getDoubleArray:

Get a double Array element at the provided index

- (NSArray *)getDoubleArray:(NSInteger)index

Discussion

Get a double Array element at the provided index

Declared In

SFSArray.h

getDump:

Return a formatted dump of the object that can logged or traced in the console for debugging purposes.

- (NSString *)getDump:(BOOL)format

Parameters

format

turns the “pretty print” on/off

Discussion

Return a formatted dump of the object that can logged or traced in the console for debugging purposes.

Declared In

SFSArray.h

getElementAt:

Returns the element at the specified index

- (id)getElementAt:(NSInteger)index

Discussion

Returns the element at the specified index

Declared In

SFSArray.h

getFloat:

Get a float element at the provided index

- (NSNumber *)getFloat:(NSInteger)index

Discussion

Get a float element at the provided index

Declared In

SFSArray.h

getFloatArray:

Get a float Array element at the provided index

- (NSArray *)getFloatArray:(NSInteger)index

Discussion

Get a float Array element at the provided index

Declared In

SFSArray.h

getHexDump

Returns a detailed hex-dump of the object that can logged or traced in the console for debugging purposes.

- (NSString *)getHexDump

Discussion

Returns a detailed hex-dump of the object that can logged or traced in the console for debugging purposes.

Declared In

SFSArray.h

getInt:

Get an int element at the provided index

- (NSInteger)getInt:(NSInteger)index

Discussion

Get an int element at the provided index

Declared In

SFSArray.h

getIntArray:

Get a int Array element at the provided index

- (NSArray *)getIntArray:(NSInteger)index

Discussion

Get a int Array element at the provided index

Declared In

SFSArray.h

getLong:

Get a long int element at the provided index

- (NSNumber *)getLong:(NSInteger)index

Discussion

Get a long int element at the provided index

Declared In

SFSArray.h

getLongArray:

Get a lomg Array element at the provided index

- (NSArray *)getLongArray:(NSInteger)index

Discussion

Get a lomg Array element at the provided index

Declared In

SFSArray.h

getSFSArray:

Get an SFSArray element at the provided index

- (id<ISFSArray>)getSFSArray:(NSInteger)index

Discussion

Get an SFSArray element at the provided index

Declared In

SFSArray.h

getSFSObject:

Get an SFSObject element at the provided index

- (id<ISFSObject>)getSFSObject:(NSInteger)index

Discussion

Get an SFSObject element at the provided index

Declared In

SFSArray.h

getShort:

Get a short int element at the provided index

- (NSInteger)getShort:(NSInteger)index

Discussion

Get a short int element at the provided index

Declared In

SFSArray.h

getShortArray:

Get a short Array element at the provided index

- (NSArray *)getShortArray:(NSInteger)index

Discussion

Get a short Array element at the provided index

Declared In

SFSArray.h

getUnsignedByte:

Get an unsigned byte element at the provided index

- (NSInteger)getUnsignedByte:(NSInteger)index

Discussion

Get an unsigned byte element at the provided index

Declared In

SFSArray.h

getUnsignedByteArray:

Get an Array of unsigned integers at the provided index

- (NSArray *)getUnsignedByteArray:(NSInteger)index

Discussion

Get an Array of unsigned integers at the provided index

Declared In

SFSArray.h

getUtfString:

Get a String element at the provided index

- (NSString *)getUtfString:(NSInteger)index

Discussion

Get a String element at the provided index

Declared In

SFSArray.h

getUtfStringArray:

Get a String Array element at the provided index

- (NSArray *)getUtfStringArray:(NSInteger)index

Discussion

Get a String Array element at the provided index

Declared In

SFSArray.h

getWrappedElementAt:

- (SFSDataWrapper *)getWrappedElementAt:(NSInteger)index

Discussion

Declared In

SFSArray.h

isNull:

Checks if a certain element in the Array is null

- (BOOL)isNull:(NSInteger)index

Discussion

Checks if a certain element in the Array is null

Declared In

SFSArray.h

removeElementAt:

Remove the element at the specified index

- (id)removeElementAt:(NSInteger)index

Discussion

Remove the element at the specified index

Declared In

SFSArray.h

size

Return the number of elements in the Array

- (NSInteger)size

Discussion

Return the number of elements in the Array

Declared In

SFSArray.h

toBinary

Return the binary form of the object

- (NSData *)toBinary

Discussion

Return the binary form of the object

Declared In

SFSArray.h