public class RequestedAddressFamilyAttribute extends Attribute
Modifier and Type | Field and Description |
---|---|
static char |
DATA_LENGTH
The length of the data contained in this attribute.
|
(package private) char |
family
The address family value.
|
static char |
IPv4
The IPv4 family type.
|
static char |
IPv6
The IPv6 family type.
|
static String |
NAME
Attribute Name.
|
ALTERNATE_SERVER, attributeType, CHANGE_REQUEST, CHANGED_ADDRESS, CHANNEL_NUMBER, CONNECTION_ID, DATA, DESTINATION_ADDRESS, DONT_FRAGMENT, ERROR_CODE, EVEN_PORT, FINGERPRINT, HEADER_LENGTH, ICE_CONTROLLED, ICE_CONTROLLING, LIFETIME, MAGIC_COOKIE, MAPPED_ADDRESS, MESSAGE_INTEGRITY, NONCE, PASSWORD, PRIORITY, REALM, REFLECTED_FROM, REMOTE_ADDRESS, REQUESTED_ADDRESS_FAMILY, REQUESTED_TRANSPORT, RESERVATION_TOKEN, RESPONSE_ADDRESS, SOFTWARE, SOURCE_ADDRESS, UNKNOWN_ATTRIBUTES, UNKNOWN_OPTIONAL_ATTRIBUTE, USE_CANDIDATE, USERNAME, XOR_MAPPED_ADDRESS, XOR_ONLY, XOR_PEER_ADDRESS, XOR_RELAYED_ADDRESS
Modifier | Constructor and Description |
---|---|
protected |
RequestedAddressFamilyAttribute()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
decodeAttributeBody(byte[] attributeValue,
char offset,
char length)
Sets this attribute's fields according to attributeValue array.
|
byte[] |
encode()
Returns a binary representation of this attribute.
|
boolean |
equals(Object obj)
Compares two TURN Attributes.
|
char |
getDataLength()
Returns the length of this attribute's body.
|
char |
getFamily()
Gets the address family value
|
String |
getName()
Returns the human readable name of this attribute.
|
boolean |
setFamily(char family)
Sets the address family value
|
getAttributeType, getLocationInMessage, setAttributeType, setLocationInMessage
public static final String NAME
public static final char DATA_LENGTH
public static final char IPv4
public static final char IPv6
char family
protected RequestedAddressFamilyAttribute()
public char getDataLength()
getDataLength
in class Attribute
public String getName()
public boolean equals(Object obj)
public byte[] encode()
void decodeAttributeBody(byte[] attributeValue, char offset, char length) throws StunException
decodeAttributeBody
in class Attribute
attributeValue
- a binary array containing this attribute's field
values and NOT containing the attribute header.offset
- the position where attribute values begin (most often
offset is equal to the index of the first byte after
length)length
- the length of the binary array.StunException
- if attrubteValue contains invalid data.public char getFamily()
public boolean setFamily(char family)
family
- the address family value to setCopyright © 2018. All rights reserved.