# Class Username

java.lang.Object
de.javawi.jstun.attribute.MessageAttribute
de.javawi.jstun.attribute.Username

All Implemented Interfaces:
  `MessageAttributeInterface`

public class Username extends MessageAttribute

## Nested Class Summary

### Nested classes/interfaces inherited from interface MessageAttributeInterface

`MessageAttributeInterface.MessageAttributeType`

## Field Summary

### Fields inherited from interface MessageAttributeInterface

`CHANGEDADDRESS, CHANGEREQUEST, DUMMY, ERRORCODE, MAPPEDADDRESS, MESSAGEINTEGRITY, PASSWORD, REFLECTEDFROM, RESPONSEADDRESS, SOURCEADDRESS, UNKNOWNATTRIBUTE, USERNAME`

## Constructor Summary

Constructors
Constructor
Description
`Username()`
`Username(String username)`

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`getBytes()`
`String`
`getUsername()`
`static Username`
`parse(byte[] data)`
`void`
`setUsername(String username)`

### Methods inherited from class MessageAttribute

`getLength, getType, intToType, parseCommonHeader, setType, typeToInteger`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Username

public Username()

### Username

public Username(String username)

## Method Details

### getUsername

public String getUsername()

### setUsername

public void setUsername(String username)

### getBytes

public byte[] getBytes() throws UtilityException

Specified by:
  `getBytes` in class `MessageAttribute`
Throws:
  `UtilityException`

### parse

public static Username parse(byte[] data)