Class Address
- java.lang.Object
-
- org.jainslee.resources.diameter.base.types.Address
-
public class Address extends Object
Java class to represent the Address AVP type. The Address format is derived from the OctetString AVP Base Format. It is a discriminated union, representing, for example a 32-bit (IPv4) [IPV4] or 128-bit (IPv6) [IPV6] address, most significant octet first. The first two octets of the Address AVP represents the AddressType, which contains an Address Family defined in [IANAADFAM]. The AddressType is used to discriminate the content and format of the remaining octets.
-
-
Constructor Summary
Constructors Constructor Description Address(AddressType addressType, byte[] address)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AddressType
addressTypeFromBytes(byte b1, byte b2)
static Address
decode(byte[] encodedAddress)
byte[]
encode()
byte[]
getAddress()
AddressType
getAddressType()
String
toString()
void
validateAddress()
-
-
-
Constructor Detail
-
Address
public Address(AddressType addressType, byte[] address)
-
-
Method Detail
-
getAddressType
public AddressType getAddressType()
-
getAddress
public byte[] getAddress()
-
decode
public static Address decode(byte[] encodedAddress)
-
encode
public byte[] encode()
-
validateAddress
public void validateAddress() throws DecodeException
- Throws:
DecodeException
-
addressTypeFromBytes
public static AddressType addressTypeFromBytes(byte b1, byte b2)
-
-