public class NumUtils extends Object
| 构造器和说明 |
|---|
NumUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
from256Num(byte... data)
256进制转换(大端模式)
|
static long |
from256Num(byte[] data,
int from,
int to)
256进制转换(大端模式)
|
static long |
from256NumLite(byte[] data,
int from,
int to)
256进制转换(小端模式)
|
static int |
from62Num(byte... data)
62进制转换(大端模式)
|
static boolean |
not62Num(byte... data)
判断一个字节数组是否不是62进制数
|
static byte[] |
to256Num(long value,
int length)
int 值转 256 进制字节数组(大端模式)
数据的高字节保存在内存的低地址中,而数据的低字节保存在内存的高地址中
|
static byte[] |
to256NumLite(long value,
int length)
int 值转 256 进制字节数组(小端模式:低位在前,高位在后)
|
static byte |
to62(int v) |
static byte[] |
to62Num(int value,
int length)
int 值转 62 进制字节数组(大端模式)
|
static int |
unsigned(byte value)
无符号整数
|
public static final int RADIX_62
public static final int RADIX_256
public static int from62Num(byte... data)
data - 序号低的为高位,序号高的为低位,最多5字节public static boolean not62Num(byte... data)
data - 数据public static byte[] to62Num(int value,
int length)
value - 数值length - 目标数组长度public static int unsigned(byte value)
public static int from256Num(byte... data)
data - 序号低的为高位,序号高的为低位,最多5字节public static long from256Num(byte[] data,
int from,
int to)
data - 序号低的为高位,序号高的为低位public static byte[] to256Num(long value,
int length)
value - 数值length - 目标数组长度public static long from256NumLite(byte[] data,
int from,
int to)
data - 低位在前,高位在后public static byte[] to256NumLite(long value,
int length)
value - 数值length - 目标数组长度public static byte to62(int v)
Copyright © 2024. All rights reserved.