Package org.fisco.bcos.sdk.utils
Class Numeric
java.lang.Object
org.fisco.bcos.sdk.utils.Numeric
public final class Numeric
extends java.lang.Object
Message codec functions.
-
Method Summary
Modifier and Type Method Description 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 booleanisIntegerValue(java.math.BigDecimal value)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.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.StringtoHexStringWithPrefixSafe(java.math.BigInteger value)static java.lang.StringtoHexStringWithPrefixZeroPadded(java.math.BigInteger value, int size)
-
Method Details
-
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(byte[] input) -
toHexStringNoPrefix
public static java.lang.String toHexStringNoPrefix(java.math.BigInteger value) -
toHexStringWithPrefixZeroPadded
public static java.lang.String toHexStringWithPrefixZeroPadded(java.math.BigInteger value, int size) -
toHexStringWithPrefixSafe
public static java.lang.String toHexStringWithPrefixSafe(java.math.BigInteger value) -
toHexStringNoPrefixZeroPadded
public static java.lang.String toHexStringNoPrefixZeroPadded(java.math.BigInteger value, int size) -
toBytesPadded
public static byte[] toBytesPadded(java.math.BigInteger value, int length) -
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) -
asByte
public static byte asByte(int m, int n) -
isIntegerValue
public static boolean isIntegerValue(java.math.BigDecimal value)
-