Methods Summary |
---|
public java.lang.Object | clone()Copies the current instance.
ConnectionField retval = new ConnectionField();
retval.nettype = this.nettype;
retval.addrtype = this.addrtype;
if (this.address != null)
retval.address = (ConnectionAddress)
this.address.clone();
return retval;
|
public java.lang.String | encode()Gets the string encoded version of this object.
String encoded_string = CONNECTION_FIELD;
if (nettype != null) encoded_string += nettype;
if (addrtype != null) encoded_string += Separators.SP + addrtype;
if (address != null) encoded_string += Separators.SP +
address.encode();
return encoded_string += Separators.NEWLINE;
|
public java.lang.String | getAddress()Returns the type of the network for this Connection.
ConnectionAddress connectionAddress = getConnectionAddress();
if (connectionAddress == null)
return null;
else {
Host host = connectionAddress.getAddress();
if (host == null)
return null;
else return host.getAddress();
}
|
public java.lang.String | getAddressType()Returns the type of the address for this Connection.
return getAddrtype();
|
public java.lang.String | getAddrtype()Gets the address type.
return addrtype;
|
public ConnectionAddress | getConnectionAddress()Gets the network connection address.
return address;
|
public java.lang.String | getNettype()Gets the network type.
return nettype;
|
public java.lang.String | getNetworkType()Returns the type of the network for this Connection.
return getNettype();
|
public void | setAddrType(java.lang.String a)Sets the address type member.
addrtype = a;
|
public void | setAddress(java.lang.String addr)Sets the type of the address for this Connection.
if (addr == null)
throw new SdpException("the addr is null");
else {
if (address == null) {
address = new ConnectionAddress();
Host host = new Host(addr);
address.setAddress(host);
} else {
Host host = address.getAddress();
if (host == null) {
host = new Host(addr);
address.setAddress(host);
} else
host.setAddress(addr);
}
setAddress(address);
}
|
public void | setAddress(ConnectionAddress a)Sets the address member.
address = a;
|
public void | setAddressType(java.lang.String type)Returns the type of the network for this Connection.
if (type == null)
throw new SdpException("the type is null");
this.addrtype = type;
|
public void | setNettype(java.lang.String n)Sets the network type member.
nettype = n;
|
public void | setNetworkType(java.lang.String type)Sets the type of the network for this Connection.
if (type == null)
throw new SdpException("the type is null");
else setNettype(type);
|
public java.lang.String | toString()Encodes contents as a textstring. return this.encode();
|