类 Numeric
java.lang.Object
org.nervos.ckb.utils.Numeric
public final class Numeric
extends java.lang.Object
Message codec functions.
-
方法概要
修饰符和类型 方法 说明 static byteasByte(int m, int n)static java.lang.StringcleanHexPrefix(java.lang.String input)static booleancontainsHexPrefix(java.lang.String input)static java.math.BigIntegerdecodeQuantity(java.lang.String value)static java.lang.StringencodeQuantity(java.math.BigInteger value)static byte[]hexStringToByteArray(java.lang.String input)static java.util.List<java.lang.Byte>intToBytes(int value)static booleanisIntegerValue(java.lang.String value)static booleanisIntegerValue(java.math.BigDecimal value)static java.lang.StringlittleEndian(long number)static java.lang.StringprependHexPrefix(java.lang.String input)static java.math.BigIntegertoBigInt(byte[] value)static java.math.BigIntegertoBigInt(byte[] value, int offset, int length)static java.math.BigIntegertoBigInt(java.lang.String hexValue)static java.math.BigIntegertoBigIntNoPrefix(java.lang.String hexValue)static byte[]toBytesPadded(java.math.BigInteger value, int length)static java.lang.StringtoHexString(byte[] input)static java.lang.StringtoHexString(byte[] input, int offset, int length, boolean withPrefix)static java.lang.StringtoHexString(java.lang.String input)static java.lang.StringtoHexStringNoPrefix(byte[] input)static java.lang.StringtoHexStringNoPrefix(java.math.BigInteger value)static java.lang.StringtoHexStringNoPrefixZeroPadded(java.math.BigInteger value, int size)static java.lang.StringtoHexStringWithPrefix(java.math.BigInteger value)static java.lang.StringtoHexStringWithPrefixZeroPadded(java.math.BigInteger value, int size)
-
方法详细资料
-
encodeQuantity
public static java.lang.String encodeQuantity(java.math.BigInteger value) -
decodeQuantity
public static java.math.BigInteger decodeQuantity(java.lang.String value) -
cleanHexPrefix
public static java.lang.String cleanHexPrefix(java.lang.String input) -
prependHexPrefix
public static java.lang.String prependHexPrefix(java.lang.String input) -
containsHexPrefix
public static boolean containsHexPrefix(java.lang.String input) -
toBigInt
public static java.math.BigInteger toBigInt(byte[] value, int offset, int length) -
toBigInt
public static java.math.BigInteger toBigInt(byte[] value) -
toBigInt
public static java.math.BigInteger toBigInt(java.lang.String hexValue) -
toBigIntNoPrefix
public static java.math.BigInteger toBigIntNoPrefix(java.lang.String hexValue) -
toHexStringWithPrefix
public static java.lang.String toHexStringWithPrefix(java.math.BigInteger value) -
toHexStringNoPrefix
public static java.lang.String toHexStringNoPrefix(java.math.BigInteger value) -
toHexStringNoPrefix
public static java.lang.String toHexStringNoPrefix(byte[] input) -
toHexStringWithPrefixZeroPadded
public static java.lang.String toHexStringWithPrefixZeroPadded(java.math.BigInteger value, int size) -
toHexStringNoPrefixZeroPadded
public static java.lang.String toHexStringNoPrefixZeroPadded(java.math.BigInteger value, int size) -
toBytesPadded
public static byte[] toBytesPadded(java.math.BigInteger value, int length) -
littleEndian
public static java.lang.String littleEndian(long number) -
hexStringToByteArray
public static byte[] hexStringToByteArray(java.lang.String input) -
toHexString
public static java.lang.String toHexString(byte[] input, int offset, int length, boolean withPrefix) -
toHexString
public static java.lang.String toHexString(byte[] input) -
toHexString
public static java.lang.String toHexString(java.lang.String input) -
asByte
public static byte asByte(int m, int n) -
isIntegerValue
public static boolean isIntegerValue(java.math.BigDecimal value) -
isIntegerValue
public static boolean isIntegerValue(java.lang.String value) -
intToBytes
public static java.util.List<java.lang.Byte> intToBytes(int value)
-