de.javawi.jstun.attribute
Class MessageAttribute

java.lang.Object
  extended by de.javawi.jstun.attribute.MessageAttribute
All Implemented Interfaces:
MessageAttributeInterface
Direct Known Subclasses:
ChangeRequest, Dummy, ErrorCode, MappedResponseChangedSourceAddressReflectedFrom, MessageIntegrity, Password, UnknownAttribute, Username

public abstract class MessageAttribute
extends Object
implements MessageAttributeInterface


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.javawi.jstun.attribute.MessageAttributeInterface
MessageAttributeInterface.MessageAttributeType
 
Field Summary
 
Fields inherited from interface de.javawi.jstun.attribute.MessageAttributeInterface
CHANGEDADDRESS, CHANGEREQUEST, DUMMY, ERRORCODE, MAPPEDADDRESS, MESSAGEINTEGRITY, PASSWORD, REFLECTEDFROM, RESPONSEADDRESS, SOURCEADDRESS, UNKNOWNATTRIBUTE, USERNAME
 
Constructor Summary
MessageAttribute()
           
MessageAttribute(MessageAttributeInterface.MessageAttributeType type)
           
 
Method Summary
abstract  byte[] getBytes()
           
 int getLength()
           
 MessageAttributeInterface.MessageAttributeType getType()
           
static MessageAttributeInterface.MessageAttributeType intToType(long type)
           
static MessageAttribute parseCommonHeader(byte[] data)
           
 void setType(MessageAttributeInterface.MessageAttributeType type)
           
static int typeToInteger(MessageAttributeInterface.MessageAttributeType type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageAttribute

public MessageAttribute()

MessageAttribute

public MessageAttribute(MessageAttributeInterface.MessageAttributeType type)
Method Detail

setType

public void setType(MessageAttributeInterface.MessageAttributeType type)

getType

public MessageAttributeInterface.MessageAttributeType getType()

typeToInteger

public static int typeToInteger(MessageAttributeInterface.MessageAttributeType type)

intToType

public static MessageAttributeInterface.MessageAttributeType intToType(long type)

getBytes

public abstract byte[] getBytes()
                         throws UtilityException
Throws:
UtilityException

getLength

public int getLength()
              throws UtilityException
Throws:
UtilityException

parseCommonHeader

public static MessageAttribute parseCommonHeader(byte[] data)
                                          throws MessageAttributeParsingException
Throws:
MessageAttributeParsingException