public class IPUtil
extends java.lang.Object
| Constructor and Description |
|---|
IPUtil() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 bufferpublic 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 bufferCopyright © 2001-2005 Echomine. All Rights Reserved.