classes represent a platform-neutral, high level Java objects that abstract the data transport between client and server.
They are used to respectively represent data in form of a map and a list; they can be nested and transport many different data types.
These objects provide high speed serialization using the default SmartFoxServer binary protocol and the types distinction grants a fine-grained size control of data sent over the network.
The following is a list of types supported by the SFSArray class:
- byte (8 bit integer)
- short (16 bit integer)
- int (32 bit integer)
- long (64 bit integer)
- float (32 bit floating point number)
- double (64 bit double precision number)
- utf-string (UTF-8 encoded string, with length up to 32 KBytes)
- text (UTF-8 encoded string, with length up to 2 GBytes)
- boolean array
- byte array
- short array
- int array
- long array
- float array
- double array
- utf-string array
SFSObjects and SFSArrays can be nested to create complex data structures.
Using a SFSArray can help to further reduce to a minimum the amount of bytes sent, because it avoids the overhead of key names for each item like in a SFSObject.
- For members of the SFSArray class, please refer to its Javadoc.
- Strings are handled via UTF-8 encoding, to support all languages and character sets.
This is inconsistent with the max and min Long values available in Java, which are down to
-2^63 and up to