|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.net.NetAddress
public class NetAddress
Contains a Network address.
| Field Summary | |
|---|---|
static NetAddress |
ANY
Broadcast network address. |
static NetAddress[] |
EMPTY_ARRAY
Zero-length array of NetAddress type. |
private java.net.InetAddress |
ip
address data. |
static NetAddress |
LOCAL
Loopback network address. |
static NetAddress |
NULL
Null/invalid network address. |
| Constructor Summary | |
|---|---|
NetAddress(byte[] addr)
Create a new network address object. |
|
NetAddress(java.net.InetAddress ip)
Create a new network address object. |
|
NetAddress(int i)
Create a new network address object. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Return whether this network address is equal to another object. |
java.net.InetAddress |
getIP()
Return IP address information. |
int |
hashCode()
Compute hash code for network address. |
private static byte[] |
intToByteArray(int i)
Convert an integer into a byte array. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final NetAddress LOCAL
public static final NetAddress NULL
public static final NetAddress ANY
public static final NetAddress[] EMPTY_ARRAY
private java.net.InetAddress ip
| Constructor Detail |
|---|
public NetAddress(java.net.InetAddress ip)
ip - address datapublic NetAddress(byte[] addr)
addr - address datapublic NetAddress(int i)
i - address data| Method Detail |
|---|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - object to test equality against
public java.net.InetAddress getIP()
private static byte[] intToByteArray(int i)
i - input integer to convert
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||