SFSArray Class Reference
| 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.
Tasks
-
+ newFromArray:Alternative static constructor that builds an SFSArray populated with the data found in the passed Array
-
+ newFromBinaryData:Alternative static constructor that builds an SFSArray from a valid SFSArray binary representation
-
+ newInstanceAlternative static constructor
-
– contains:Returns true if the passed object is contained in the Array
-
– getElementAt:Returns the element at the specified index
-
– getWrappedElementAt: -
– removeElementAt:Remove the element at the specified index
-
– sizeReturn the number of elements in the Array
-
– toBinaryReturn the binary form of the object
-
– getDump:Return a formatted dump of the object that can logged or traced in the console for debugging purposes.
-
– getHexDumpReturns a detailed hex-dump of the object that can logged or traced in the console for debugging purposes.
-
– addNullAdd a null element
-
– addBool:Add a Boolean value
-
– addByte:Add a byte value (8 bit)
-
– addShort:Add a short int value (16 bit)
-
– addInt:Add an int value (32 bit)
-
– addLong:Add a long int value (64 bit)
-
– addFloat:Add a float value (32 bit)
-
– addDouble:Add a dobule value (64 bit)
-
– addUtfString:Add a UTF-8 String
-
– addBoolArray:Add an array of Booleans
-
– addByteArray:Add an array of bytes
-
– addShortArray:Add an array of short ints
-
– addIntArray:Add an array of ints
-
– addLongArray:Add an array of long ints
-
– addFloatArray:Add an array of floats
-
– addDoubleArray:Add an array of doubles
-
– addUtfStringArray:Add an array of UTF-8 String
-
– addSFSArray:Add an SFSArray
-
– addSFSObject:Add an SFSObject
-
– add: -
– isNull:Checks if a certain element in the Array is null
-
– getBool:Get a Boolean element at the provided index
-
– getByte:Get a byte element at the provided index
-
– getUnsignedByte:Get an unsigned byte element at the provided index
-
– getShort:Get a short int element at the provided index
-
– getInt:Get an int element at the provided index
-
– getLong:Get a long int element at the provided index
-
– getFloat:Get a float element at the provided index
-
– getDouble:Get a double element at the provided index
-
– getUtfString:Get a String element at the provided index
-
– getBoolArray:Get a Boolean Array element at the provided index
-
– getByteArray:Get a byte Array element at the provided index
-
– getUnsignedByteArray:Get an Array of unsigned integers at the provided index
-
– getShortArray:Get a short Array element at the provided index
-
– getIntArray:Get a int Array element at the provided index
-
– getLongArray:Get a lomg Array element at the provided index
-
– getFloatArray:Get a float Array element at the provided index
-
– getDoubleArray:Get a double Array element at the provided index
-
– getUtfStringArray:Get a String Array element at the provided index
-
– getSFSArray:Get an SFSArray element at the provided index
-
– getSFSObject:Get an SFSObject element at the provided index
Class Methods
newFromArray:
Alternative static constructor that builds an SFSArray populated with the data found in the passed Array
+ (SFSArray *)newFromArray:(NSArray *)arrDiscussion
Alternative static constructor that builds an SFSArray populated with the data found in the passed Array
Declared In
SFSArray.hInstance Methods
addBool:
Add a Boolean value
- (void)addBool:(BOOL)valueDiscussion
Add a Boolean value
Declared In
SFSArray.haddBoolArray:
Add an array of Booleans
- (void)addBoolArray:(NSArray *)valueDiscussion
Add an array of Booleans
Declared In
SFSArray.haddByte:
Add a byte value (8 bit)
- (void)addByte:(NSInteger)valueDiscussion
Add a byte value (8 bit)
Declared In
SFSArray.haddByteArray:
Add an array of bytes
- (void)addByteArray:(NSData *)valueDiscussion
Add an array of bytes
Declared In
SFSArray.haddDouble:
Add a dobule value (64 bit)
- (void)addDouble:(NSNumber *)valueDiscussion
Add a dobule value (64 bit)
Declared In
SFSArray.haddDoubleArray:
Add an array of doubles
- (void)addDoubleArray:(NSArray *)valueDiscussion
Add an array of doubles
Declared In
SFSArray.haddFloat:
Add a float value (32 bit)
- (void)addFloat:(NSNumber *)valueDiscussion
Add a float value (32 bit)
Declared In
SFSArray.haddFloatArray:
Add an array of floats
- (void)addFloatArray:(NSArray *)valueDiscussion
Add an array of floats
Declared In
SFSArray.haddInt:
Add an int value (32 bit)
- (void)addInt:(NSInteger)valueDiscussion
Add an int value (32 bit)
Declared In
SFSArray.haddIntArray:
Add an array of ints
- (void)addIntArray:(NSArray *)valueDiscussion
Add an array of ints
Declared In
SFSArray.haddLong:
Add a long int value (64 bit)
- (void)addLong:(NSNumber *)valueDiscussion
Add a long int value (64 bit)
Declared In
SFSArray.haddLongArray:
Add an array of long ints
- (void)addLongArray:(NSArray *)valueDiscussion
Add an array of long ints
Declared In
SFSArray.haddSFSArray:
Add an SFSArray
- (void)addSFSArray:(id<ISFSArray>)valueDiscussion
Add an SFSArray
Declared In
SFSArray.haddSFSObject:
Add an SFSObject
- (void)addSFSObject:(id<ISFSObject>)valueDiscussion
Add an SFSObject
See Also
Declared In
SFSArray.haddShort:
Add a short int value (16 bit)
- (void)addShort:(NSInteger)valueDiscussion
Add a short int value (16 bit)
Declared In
SFSArray.haddShortArray:
Add an array of short ints
- (void)addShortArray:(NSArray *)valueDiscussion
Add an array of short ints
Declared In
SFSArray.haddUtfString:
Add a UTF-8 String
- (void)addUtfString:(NSString *)valueDiscussion
Add a UTF-8 String
Declared In
SFSArray.haddUtfStringArray:
Add an array of UTF-8 String
- (void)addUtfStringArray:(NSArray *)valueDiscussion
Add an array of UTF-8 String
Declared In
SFSArray.hcontains:
Returns true if the passed object is contained in the Array
- (BOOL)contains:(id)objDiscussion
Returns true if the passed object is contained in the Array
Declared In
SFSArray.hgetBool:
Get a Boolean element at the provided index
- (BOOL)getBool:(NSInteger)indexDiscussion
Get a Boolean element at the provided index
Declared In
SFSArray.hgetBoolArray:
Get a Boolean Array element at the provided index
- (NSArray *)getBoolArray:(NSInteger)indexDiscussion
Get a Boolean Array element at the provided index
Declared In
SFSArray.hgetByte:
Get a byte element at the provided index
- (NSInteger)getByte:(NSInteger)indexDiscussion
Get a byte element at the provided index
Declared In
SFSArray.hgetByteArray:
Get a byte Array element at the provided index
- (NSData *)getByteArray:(NSInteger)indexDiscussion
Get a byte Array element at the provided index
Declared In
SFSArray.hgetDouble:
Get a double element at the provided index
- (NSNumber *)getDouble:(NSInteger)indexDiscussion
Get a double element at the provided index
Declared In
SFSArray.hgetDoubleArray:
Get a double Array element at the provided index
- (NSArray *)getDoubleArray:(NSInteger)indexDiscussion
Get a double Array element at the provided index
Declared In
SFSArray.hgetDump:
Return a formatted dump of the object that can logged or traced in the console for debugging purposes.
- (NSString *)getDump:(BOOL)formatParameters
- 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.hgetElementAt:
Returns the element at the specified index
- (id)getElementAt:(NSInteger)indexDiscussion
Returns the element at the specified index
Declared In
SFSArray.hgetFloat:
Get a float element at the provided index
- (NSNumber *)getFloat:(NSInteger)indexDiscussion
Get a float element at the provided index
Declared In
SFSArray.hgetFloatArray:
Get a float Array element at the provided index
- (NSArray *)getFloatArray:(NSInteger)indexDiscussion
Get a float Array element at the provided index
Declared In
SFSArray.hgetHexDump
Returns a detailed hex-dump of the object that can logged or traced in the console for debugging purposes.
- (NSString *)getHexDumpDiscussion
Returns a detailed hex-dump of the object that can logged or traced in the console for debugging purposes.
Declared In
SFSArray.hgetInt:
Get an int element at the provided index
- (NSInteger)getInt:(NSInteger)indexDiscussion
Get an int element at the provided index
Declared In
SFSArray.hgetIntArray:
Get a int Array element at the provided index
- (NSArray *)getIntArray:(NSInteger)indexDiscussion
Get a int Array element at the provided index
Declared In
SFSArray.hgetLong:
Get a long int element at the provided index
- (NSNumber *)getLong:(NSInteger)indexDiscussion
Get a long int element at the provided index
Declared In
SFSArray.hgetLongArray:
Get a lomg Array element at the provided index
- (NSArray *)getLongArray:(NSInteger)indexDiscussion
Get a lomg Array element at the provided index
Declared In
SFSArray.hgetSFSArray:
Get an SFSArray element at the provided index
- (id<ISFSArray>)getSFSArray:(NSInteger)indexDiscussion
Get an SFSArray element at the provided index
Declared In
SFSArray.hgetSFSObject:
Get an SFSObject element at the provided index
- (id<ISFSObject>)getSFSObject:(NSInteger)indexDiscussion
Get an SFSObject element at the provided index
Declared In
SFSArray.hgetShort:
Get a short int element at the provided index
- (NSInteger)getShort:(NSInteger)indexDiscussion
Get a short int element at the provided index
Declared In
SFSArray.hgetShortArray:
Get a short Array element at the provided index
- (NSArray *)getShortArray:(NSInteger)indexDiscussion
Get a short Array element at the provided index
Declared In
SFSArray.hgetUnsignedByte:
Get an unsigned byte element at the provided index
- (NSInteger)getUnsignedByte:(NSInteger)indexDiscussion
Get an unsigned byte element at the provided index
Declared In
SFSArray.hgetUnsignedByteArray:
Get an Array of unsigned integers at the provided index
- (NSArray *)getUnsignedByteArray:(NSInteger)indexDiscussion
Get an Array of unsigned integers at the provided index
Declared In
SFSArray.hgetUtfString:
Get a String element at the provided index
- (NSString *)getUtfString:(NSInteger)indexDiscussion
Get a String element at the provided index
Declared In
SFSArray.hgetUtfStringArray:
Get a String Array element at the provided index
- (NSArray *)getUtfStringArray:(NSInteger)indexDiscussion
Get a String Array element at the provided index
Declared In
SFSArray.hgetWrappedElementAt:
- (SFSDataWrapper *)getWrappedElementAt:(NSInteger)indexDiscussion
Declared In
SFSArray.hisNull:
Checks if a certain element in the Array is null
- (BOOL)isNull:(NSInteger)indexDiscussion
Checks if a certain element in the Array is null
Declared In
SFSArray.hremoveElementAt:
Remove the element at the specified index
- (id)removeElementAt:(NSInteger)indexDiscussion
Remove the element at the specified index
Declared In
SFSArray.h