|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.vattp.data.NetAddr
Untamed:
| Field Summary | |
private InetAddress |
myOptIP
null means a port associated with all local IP addresses |
private int |
myPortNumber
|
| Constructor Summary | |
NetAddr(InetAddress optIP,
int portNumber)
Enabled: Construct a new NetAddr given an IP address and a port number. |
|
NetAddr(String optAddr)
Enabled: Construct a NetAddr from a string in the form: hostname:portnumber or hostname. |
|
| Method Summary | |
boolean |
equals(Object other)
Suppressed: Test if another object is an NetAddr denoting the same address as this. |
int |
getPort()
Enabled: Return my port number. |
int |
hashCode()
Suppressed: @return A hash code that accounts for both the IP address and port. |
InetAddress |
optInetAddress()
Enabled: Return my IP address, or null indicating all local IP addresses. |
String |
toString()
Suppressed: Produce a printable representation of this. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private final InetAddress myOptIP
private final int myPortNumber
| Constructor Detail |
public NetAddr(String optAddr)
throws UnknownHostException
Examples:
"the-earth.communities.com/205.162.51.187:4568" "the-earth.communities.com:4568" "205.162.51.187:4568" "the-earth.communities.com" ":4568" "" null
optAddr - is the network address.
UnknownHostException - is thrown if the host name can not
be resolved.
public NetAddr(InetAddress optIP,
int portNumber)
optIP - An IP address, or null meaning all local IP addressesportNumber - A port at that IP address| Method Detail |
public boolean equals(Object other)
equals in class Objectother - The other object to test for equality.
Object.hashCode(),
java.util.Hashtablepublic int hashCode()
hashCode in class Objectjava.lang.Object#equals(java.lang.Object),
java.util.Hashtablepublic InetAddress optInetAddress()
public int getPort()
public String toString()
toString in class Object
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||