|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lwes.util.IPAddress
public class IPAddress
This is a wrapper class for InetAddress, which allows the setting of an InetAddress with a byte arrays. As well as other useful functions.
| Constructor Summary | |
|---|---|
IPAddress()
Defaut constructor |
|
IPAddress(byte[] anIPAddress)
Construct an IPAddress object with a byte array containing the InetAddress in little-endian notation. |
|
IPAddress(java.net.InetAddress anIPAddress)
Construct an IPAddress object with an InetAddress. |
|
IPAddress(java.lang.String anIPAddress)
Construct an IPAddress object with a string of the form "%d.%d.%d.%d" representing an InetAddress. |
|
| Method Summary | |
|---|---|
int |
bytesStoreSize()
return the size that an IPAddress takes up in a serialized byte array |
boolean |
equals(java.lang.Object o)
|
byte[] |
getInetAddressAsBytes()
Return the IPAddress in a byte array in network order |
int |
hashcode()
|
java.net.InetAddress |
toInetAddress()
Get the InetAddress representing this IPAddress |
int |
toInt()
Return the IPAddress in as an integer |
java.lang.String |
toString()
return a string representation of an IPAddress in the following format "%d.%d.%d.%d". |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IPAddress()
public IPAddress(java.lang.String anIPAddress)
anIPAddress - the string representing the IPAddresspublic IPAddress(byte[] anIPAddress)
anIPAddress - the byte array representing the IPAddresspublic IPAddress(java.net.InetAddress anIPAddress)
anIPAddress - the InetAddress to set this IPAddress to| Method Detail |
|---|
public java.net.InetAddress toInetAddress()
public byte[] getInetAddressAsBytes()
public int toInt()
public java.lang.String toString()
toString in class java.lang.Objectpublic int bytesStoreSize()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashcode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||