-
- All Implemented Interfaces:
public class OptionalAttribute extends Attribute
This class is used for representing attributes not explicitly supported by the stack. Such attributes will generally be kept in binary form and won't be subdued to any processing by the stack. One could use this class for both dealing with attributes in received messages, and generating messages containing attributes not explicitly supported by the stack.
-
-
Method Summary
Modifier and Type Method Description 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. Array<byte>getBody()Returns a reference to the unparsed body of this attribute. voidsetBody(Array<byte> body, int offset, int length)Copies the speicified byte array segment as the body of this attribute. booleanequals(Object obj)Compares two STUN Attributes. -
-
Method Detail
-
getDataLength
char getDataLength()
Returns the length of this attribute's body.
-
setBody
void setBody(Array<byte> body, int offset, int length)
Copies the speicified byte array segment as the body of this attribute.
- Parameters:
body- the body to copyoffset- the position to startlength- the length to copy
-
-
-
-