-
- All Implemented Interfaces:
public class DataAttribute extends Attribute
The DATA attribute contains the data the client wants to relay to the TURN server or the TURN server to forward the response data. The value of DATA is variable length. Its length MUST be a multiple of 4 (measured in bytes) in order to guarantee alignment of attributes on word boundaries.
-
-
Method Summary
Modifier and Type Method Description Array<byte>getData()Returns a (cloned) byte array containing the data value of the data attribute. voidsetData(Array<byte> data)Copies the specified binary array into the the data value of the data attribute. Array<byte>encode()Returns a binary representation of this attribute. chargetDataLength()Returns the length of this attribute's body. StringgetName()Returns the human readable name of this attribute. booleanequals(Object obj)Compares two STUN Attributes. -
-
Method Detail
-
getData
Array<byte> getData()
Returns a (cloned) byte array containing the data value of the data attribute.
-
setData
void setData(Array<byte> data)
Copies the specified binary array into the the data value of the data attribute.
- Parameters:
data- the binary array containing the data.
-
getDataLength
char getDataLength()
Returns the length of this attribute's body.
-
-
-
-