public interface ISFSArray
Modifier and Type | Method and Description |
---|---|
void |
add(SFSDataWrapper wrappedObject) |
void |
addBool(boolean value)
Add a boolean
|
void |
addBoolArray(java.util.Collection<java.lang.Boolean> value)
Add an collection of boolean
|
void |
addByte(byte value)
Add a byte (signed 8-bit)
|
void |
addByteArray(byte[] value)
Add an array of bytes
NOTE: This is not supported for HTML5 / Websocket clients, which includes Unity WebGL exports.
|
void |
addClass(java.lang.Object o)
Add a Class instance.
|
void |
addDouble(double value)
Add a byte (signed decimal 64-bit)
|
void |
addDoubleArray(java.util.Collection<java.lang.Double> value)
Add a collection of double
|
void |
addFloat(float value)
Add a byte (signed decimal 32-bit)
|
void |
addFloatArray(java.util.Collection<java.lang.Float> value)
Add a collection of float
|
void |
addInt(int value)
Add a byte (signed 32-bit)
|
void |
addIntArray(java.util.Collection<java.lang.Integer> value)
Add a collection of int
|
void |
addLong(long value)
Add a byte (signed 64-bit)
|
void |
addLongArray(java.util.Collection<java.lang.Long> value)
Add a collection of long
|
void |
addNull()
Add a null field to the Object.
|
void |
addSFSArray(ISFSArray value)
Add a nested ISFSArray
|
void |
addSFSObject(ISFSObject value)
Add a nested ISFSObject
|
void |
addShort(short value)
Add a byte (signed 16-bit)
|
void |
addShortArray(java.util.Collection<java.lang.Short> value)
Add a collection of short
|
void |
addText(java.lang.String value)
Add a long String encoded in UTF-8 with max length of 2 GBytes
|
void |
addUtfString(java.lang.String value)
Add a String encoded in UTF-8 with max length of 32 KBytes
|
void |
addUtfStringArray(java.util.Collection<java.lang.String> value)
Add a collection of string
|
boolean |
contains(java.lang.Object obj)
Checks if a specific element is contained in the array
|
SFSDataWrapper |
get(int index) |
java.lang.Boolean |
getBool(int index)
Get the element at the specified index as Boolean.
|
java.util.Collection<java.lang.Boolean> |
getBoolArray(int index)
Get the element at the specified index as Collection of Boolean.
|
java.lang.Byte |
getByte(int index)
Get the element at the specified index as Byte.
|
byte[] |
getByteArray(int index)
Get the element at the specified index as byte array.
|
java.lang.Object |
getClass(int index)
Get the element at the specified index as Class instance.
|
java.lang.Double |
getDouble(int index)
Get the element at the specified index as Double.
|
java.util.Collection<java.lang.Double> |
getDoubleArray(int index)
Get the element at the specified index as Collection of Double.
|
java.lang.String |
getDump()
Get a detailed dump of the SFSArray structure
|
java.lang.String |
getDump(boolean noFormat)
Get a detailed dump of the SFSArray structure
|
java.lang.Object |
getElementAt(int index) |
java.lang.Float |
getFloat(int index)
Get the element at the specified index as Float.
|
java.util.Collection<java.lang.Float> |
getFloatArray(int index)
Get the element at the specified index as Collection of Float.
|
java.lang.String |
getHexDump()
Get a pretty-printed hex-dump of the array
|
java.lang.Integer |
getInt(int index)
Get the element at the specified index as Integer.
|
java.util.Collection<java.lang.Integer> |
getIntArray(int index)
Get the element at the specified index as Collection of Int.
|
java.lang.Long |
getLong(int index)
Get the element at the specified index as Long.
|
java.util.Collection<java.lang.Long> |
getLongArray(int index)
Get the element at the specified index as Collection of Long.
|
ISFSArray |
getSFSArray(int index)
Get the element at the specified index as ISFSArray.
|
ISFSObject |
getSFSObject(int index)
Get the element at the specified index as ISFSObject.
|
java.lang.Short |
getShort(int index)
Get the element at the specified index as Short.
|
java.util.Collection<java.lang.Short> |
getShortArray(int index)
Get the element at the specified index as Collection of Short.
|
java.lang.String |
getText(int index)
Get the element at the specified index as long String, with a max length of 2 GBytes.
|
java.lang.Integer |
getUnsignedByte(int index)
Get the element at the specified index as an unsigned Integer (bytes are always signed, -127 < b < 127)
It can be null if no element exists for the specified index |
java.util.Collection<java.lang.Integer> |
getUnsignedByteArray(int index)
Get the element at the specified index as a Collection of unsigned integers.
|
java.lang.String |
getUtfString(int index)
Get the element at the specified index as String, with a max length of 32 KBytes.
|
java.util.Collection<java.lang.String> |
getUtfStringArray(int index)
Get the element at the specified index as Collection of String.
|
boolean |
isNull(int index)
Checks if a specific element is null.
|
java.util.Iterator<SFSDataWrapper> |
iterator() |
void |
removeElementAt(int index)
Remove an element at a specific index
|
int |
size()
Return the number of elements contained in the array
|
byte[] |
toBinary()
Return the binary representation of the SFSArray
|
java.lang.String |
toJson()
Return the JSON representation of the SFSArray
|
boolean contains(java.lang.Object obj)
obj
- the objectjava.util.Iterator<SFSDataWrapper> iterator()
java.lang.Object getElementAt(int index)
SFSDataWrapper get(int index)
void removeElementAt(int index)
index
- the index of the element to removeint size()
byte[] toBinary()
java.lang.String toJson()
java.lang.String getHexDump()
java.lang.String getDump()
java.lang.String getDump(boolean noFormat)
noFormat
- if true the dump will not be pretty-printedvoid addNull()
This method will effectively add the key and a byte id to describe the Null value, thus "bloating" the message
void addBool(boolean value)
value
- void addByte(byte value)
value
- void addShort(short value)
value
- void addInt(int value)
value
- void addLong(long value)
value
- void addFloat(float value)
value
- void addDouble(double value)
value
- void addUtfString(java.lang.String value)
value
- void addText(java.lang.String value)
value
- void addBoolArray(java.util.Collection<java.lang.Boolean> value)
value
- void addByteArray(byte[] value)
NOTE: This is not supported for HTML5 / Websocket clients, which includes Unity WebGL exports.
value
- void addShortArray(java.util.Collection<java.lang.Short> value)
value
- void addIntArray(java.util.Collection<java.lang.Integer> value)
value
- void addLongArray(java.util.Collection<java.lang.Long> value)
value
- void addFloatArray(java.util.Collection<java.lang.Float> value)
value
- void addDoubleArray(java.util.Collection<java.lang.Double> value)
value
- void addUtfStringArray(java.util.Collection<java.lang.String> value)
value
- void addSFSArray(ISFSArray value)
value
- void addSFSObject(ISFSObject value)
value
- void addClass(java.lang.Object o)
SerializableSFSType
interface.
NOTE: This is not supported for HTML5 / Websocket clients, which includes Unity WebGL exports.
o
- the instanceSFSObject.newFromObject(Object)
void add(SFSDataWrapper wrappedObject)
boolean isNull(int index)
index
- the index of the element in the arrayjava.lang.Boolean getBool(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Byte getByte(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Integer getUnsignedByte(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Short getShort(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Integer getInt(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Long getLong(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Float getFloat(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Double getDouble(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.String getUtfString(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.String getText(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.Boolean> getBoolArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).byte[] getByteArray(int index)
NOTE: This is not supported for HTML5 / Websocket clients, which includes Unity WebGL exports.
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.Integer> getUnsignedByteArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.Short> getShortArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.Integer> getIntArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.Long> getLongArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.Float> getFloatArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.Double> getDoubleArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.util.Collection<java.lang.String> getUtfStringArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).java.lang.Object getClass(int index)
NOTE: This is not supported for HTML5 / Websocket clients, which includes Unity WebGL exports.
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).SFSObject.newFromObject(Object)
ISFSArray getSFSArray(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).ISFSObject getSFSObject(int index)
index
- java.lang.IndexOutOfBoundsException
- - if the index is out of range (index < 0 || index >= size()).ISFSObject