public class VConvert extends Object
| 构造器和说明 |
|---|
VConvert() |
| 限定符和类型 | 方法和说明 |
|---|---|
static byte |
bool2Byte(boolean b) |
static boolean |
byte2Bool(byte v) |
static String |
byteArrayToHex(byte[] bb) |
static String |
byteArrayToHex(byte[] bb,
int begin,
int len) |
static double |
bytes2double(byte[] buf,
int start) |
static int |
bytes2Int(byte[] b)
convert a byte array to a int
|
static int |
bytes2Int(byte[] b,
int start)
convert a byte array to a int
|
static long |
bytes2Long(byte[] b)
convert a byte array to a long
|
static long |
bytes2Long(byte[] b,
int start)
convert a byte array to a long
|
static byte[] |
hexToByteArray(String hexstr) |
static byte[] |
hexToByteArray(String hexstr,
int len) |
static boolean |
int2Bool(int num)
convert a int to a boolean value
|
static byte[] |
int2Bytes(int num)
convert a int to a byte array
|
static byte[] |
joinBytes(byte[] fir,
byte[] sec)
join two byte arrays to one byte array
|
static boolean |
long2Bool(long num)
convert a long value to a boolean value
|
static byte[] |
long2Bytes(long num)
convert a long value to bytes array
|
static void |
main(String[] args) |
static boolean |
str2Bool(String s)
convert a string to a boolean
|
static byte |
str2Byte(String s)
convert a string to a byte
|
static byte[] |
str2Bytes(String str,
String charset)
convert a string to a byte array
|
static double |
str2Double(String s)
convert a string to a double
|
static String |
str2Filepath(String str) |
static float |
str2Float(String s)
convert a string a float
|
static int |
str2Int(String s)
convert a string to a int
|
static long |
str2Long(String s)
convert a string to a long
|
static short |
str2Short(String s)
convert a string to a short
|
static String |
str2Webpath(String str) |
public static byte str2Byte(String s)
s - public static short str2Short(String s)
s - public static int str2Int(String s)
s - public static long str2Long(String s)
s - public static float str2Float(String s)
s - public static double str2Double(String s)
s - public static boolean str2Bool(String s)
s - public static byte[] str2Bytes(String str, String charset) throws IOException
str - charset - IOExceptionExceptionpublic static byte[] joinBytes(byte[] fir,
byte[] sec)
fir - sec - public static byte[] long2Bytes(long num)
num - public static boolean long2Bool(long num)
num - public static long bytes2Long(byte[] b)
b - public static long bytes2Long(byte[] b,
int start)
b - start - public static byte[] int2Bytes(int num)
num - public static boolean int2Bool(int num)
num - public static int bytes2Int(byte[] b)
b - public static int bytes2Int(byte[] b,
int start)
b - start - public static double bytes2double(byte[] buf,
int start)
public static boolean byte2Bool(byte v)
public static byte bool2Byte(boolean b)
public static String byteArrayToHex(byte[] bb)
public static String byteArrayToHex(byte[] bb, int begin, int len)
public static byte[] hexToByteArray(String hexstr)
public static byte[] hexToByteArray(String hexstr, int len)
public static void main(String[] args)
Copyright © 2023. All rights reserved.