|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iperg.part.core.IpUrl
public class IpUrl
The IpUrl class is used to represent URLs that express
network addresses using a protocol specific syntax. All URLs should
have the structure
protocol://device:protocol-specific.
protocol part of the URL is the name of a
protocol, for instance tcp or btspp.
device part of the URL is a name or address of
a device. For instance, if the prococol part expresses an IP
protocol, the device part should be a host name or an IP
address. If a Bluetooth protocol is used, the device part should be
a Bluetooth address.
protocol_specific URL part could for instance
include a port number if an IP protocol was used, or a service id
in case of a Bluetooth protocol.
| Constructor Summary | |
|---|---|
IpUrl(java.lang.String spec)
Create a new url object using a given string specification. |
|
IpUrl(java.lang.String protocol,
java.lang.String device,
java.lang.String protocolSpecific)
Create a new url instance by giving the protocol, device and protocol specific components separately |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Check if the url equals another object. |
java.lang.String |
getDevice()
Get the device part of the url. |
java.lang.String |
getProtocol()
Get the protocol part of the url. |
java.lang.String |
getProtocolSpecific()
Get the protocol specific part of the url. |
java.lang.String |
toString()
Create a string representation of this url |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IpUrl(java.lang.String spec)
protocol://device:protocol-specific.
The protocol part is the name of a protocol, e.g.,
udp. The device part is the address or name of a
device (e.g., an IP address or a host name). The protocol
specific part is optional and there are no syntax restrictions.
spec - A string specification from which the url will be
constructed
public IpUrl(java.lang.String protocol,
java.lang.String device,
java.lang.String protocolSpecific)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getProtocol()
public java.lang.String getDevice()
public java.lang.String getProtocolSpecific()
public boolean equals(java.lang.Object obj)
IpUrl class, and its string url must equal the
string url of this url object.
equals in class java.lang.Objectobj - The object to compare to this url
true if the object equals the url,
false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||