org.littleshoot.stun.stack.message.attributes.turn
Class DataAttribute

java.lang.Object
  extended by org.littleshoot.stun.stack.message.attributes.AbstractStunAttribute
      extended by org.littleshoot.stun.stack.message.attributes.turn.DataAttribute
All Implemented Interfaces:
StunAttribute

public final class DataAttribute
extends AbstractStunAttribute

Class that wraps incoming data from a remote host. It adds the address of the remote host so that the TURN client can demultiplex incoming data to the hosts that data is arriving from.


Constructor Summary
DataAttribute(byte[] bodyBytes)
          Creates a new data attribute wraping the specified data from a remote host.
 
Method Summary
 void accept(StunAttributeVisitor visitor)
          Allows attributes to accept visitors.
 byte[] getData()
          Accesses the raw data.
 String toString()
           
 
Methods inherited from class org.littleshoot.stun.stack.message.attributes.AbstractStunAttribute
getAttributeType, getBodyLength, getTotalLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataAttribute

public DataAttribute(byte[] bodyBytes)
Creates a new data attribute wraping the specified data from a remote host.

Parameters:
bodyBytes - The data to wrap.
Method Detail

getData

public byte[] getData()
Accesses the raw data.

Returns:
The raw data encapsulated in the attribute.

accept

public void accept(StunAttributeVisitor visitor)
Description copied from interface: StunAttribute
Allows attributes to accept visitors.

Parameters:
visitor - The visitor to accept.

toString

public String toString()
Overrides:
toString in class AbstractStunAttribute


Copyright © 2013 LittleShoot. All Rights Reserved.