类 NumUtils

java.lang.Object
cn.zhxu.toys.util.NumUtils

public class NumUtils extends Object
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final int
     
    static final int
     
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    static int
    from256Num(byte... data)
    256进制转换
    static long
    from256Num(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
    to62(int v)
     
    static byte[]
    to62Num(int value, int length)
    int 值转 62 进制字节数组
    static int
    unsigned(byte value)
    无符号整数

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • RADIX_62

      public static final int RADIX_62
      另请参阅:
    • RADIX_256

      public static final int RADIX_256
      另请参阅:
  • 构造器详细资料

    • NumUtils

      public NumUtils()
  • 方法详细资料

    • from62Num

      public static int from62Num(byte... data)
      62进制转换
      参数:
      data - 序号低的为高位,序号高的为低位,最多5字节
      返回:
    • not62Num

      public static boolean not62Num(byte... data)
      判断一个字节数组是否不是62进制数
      参数:
      data -
      返回:
    • to62Num

      public static byte[] to62Num(int value, int length)
      int 值转 62 进制字节数组
      参数:
      value -
      length -
      返回:
    • unsigned

      public static int unsigned(byte value)
      无符号整数
    • from256Num

      public static int from256Num(byte... data)
      256进制转换
      参数:
      data - 序号低的为高位,序号高的为低位,最多5字节
      返回:
    • from256Num

      public static long from256Num(byte[] data, int from, int to)
      256进制转换
      参数:
      data - 序号低的为高位,序号高的为低位
      返回:
    • to256Num

      public static byte[] to256Num(long value, int length)
      int 值转 256 进制字节数组 大端模式:数据的高字节保存在内存的低地址中,而数据的低字节保存在内存的高地址中
      参数:
      value -
      length -
      返回:
    • to62

      public static byte to62(int v)