public class Util extends Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getInt1(byte[] b,
int offset) |
static int |
getInt2(byte[] b,
int offset) |
static int |
getInt3(byte[] b,
int offset)
get a int from a byte array start from the specifield offset
|
static long |
getIntLong(byte[] b,
int offset)
get a int from a byte array start from the specifiled offset
|
static long |
ip2long(String ip)
string ip to long ip
|
static boolean |
isIpAddress(String ip)
check the validate of the specifeld ip address
|
static String |
long2ip(long ip)
int to ip string
|
static void |
write(byte[] b,
int offset,
long v,
int bytes)
write specfield bytes to a byte array start from offset
|
static void |
writeIntLong(byte[] b,
int offset,
long v)
write a int to a byte array
|
public static void write(byte[] b,
int offset,
long v,
int bytes)
b - offset - v - bytes - public static void writeIntLong(byte[] b,
int offset,
long v)
b - offet - v - public static long getIntLong(byte[] b,
int offset)
b - offset - public static int getInt3(byte[] b,
int offset)
b - offset - public static int getInt2(byte[] b,
int offset)
public static int getInt1(byte[] b,
int offset)
public static long ip2long(String ip)
ip - public static String long2ip(long ip)
ip - public static boolean isIpAddress(String ip)
ip - Copyright © 2018. All rights reserved.