org.littleshoot.stun.stack.message.attributes
Class AddressAttributeReader
java.lang.Object
org.littleshoot.stun.stack.message.attributes.AddressAttributeReader
public class AddressAttributeReader
- extends Object
Utility class for reading a STUN address and port attribute body. All
STUN attributes that contain an address and port share a common syntax.
|
Method Summary |
static InetSocketAddress |
readAddress(org.littleshoot.mina.common.ByteBuffer body)
Reads the the address and port from the STUN address attribute body. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
readAddress
public static InetSocketAddress readAddress(org.littleshoot.mina.common.ByteBuffer body)
throws IOException
- Reads the the address and port from the STUN address attribute body.
- Parameters:
body - The body of the STUN address attribute.
- Returns:
- The address and port in the body.
- Throws:
IOException - If the body does not match the STUN protocol
requirements for address and port encoding.
Copyright © 2013 LittleShoot. All Rights Reserved.