|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.echomine.util.IPUtil
public class IPUtil
Contains some utility functions that is IP and host related.
| Constructor Summary | |
|---|---|
IPUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
convertIP(long ip)
Converts a long representation of an IP into a string format "xx.xx.xx.xx" |
static int |
deserializeIP(byte[] inbuf,
int offset,
java.lang.StringBuffer outbuf)
Deserializes the IP from a given set of bytes. |
static boolean |
isHostIPPrivate(java.lang.String ip)
Checks whether an IP is private or not. |
static int |
serializeIP(java.lang.String ip,
byte[] outbuf,
int offset)
Serializes the IP from a given string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IPUtil()
| Method Detail |
|---|
public static boolean isHostIPPrivate(java.lang.String ip)
public static java.lang.String convertIP(long ip)
public static int serializeIP(java.lang.String ip,
byte[] outbuf,
int offset)
ip - The IP string in the "xx.xx.xx.xx" formatoffset - the starting offset where the bytes will write tooutbuf - the results will be appened to this buffer
public static int deserializeIP(byte[] inbuf,
int offset,
java.lang.StringBuffer outbuf)
inbuf - the buffer that contains the IP in bytesoffset - the starting offset where deserialization occursoutbuf - the results will be appened to this buffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||