Package org.web3j.utils
Class Numeric
java.lang.Object
org.web3j.utils.Numeric
Message codec functions.
Implementation as per https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding
-
Method Summary
Modifier and TypeMethodDescriptionstatic byteasByte(int m, int n) static StringcleanHexPrefix(String input) static booleancontainsHexPrefix(String input) static BigIntegerdecodeQuantity(String value) static StringencodeQuantity(BigInteger value) static byte[]hexStringToByteArray(String input) static booleanisIntegerValue(BigDecimal value) protected static booleanisValidHexQuantity(String value) static BigIntegerparsePaddedNumberHex(String value) static StringprependHexPrefix(String input) static StringremoveDoubleQuotes(String string) static BigIntegertoBigInt(byte[] value) static BigIntegertoBigInt(byte[] value, int offset, int length) static BigIntegerstatic BigIntegertoBigIntNoPrefix(String hexValue) static byte[]toBytesPadded(BigInteger value, int length) static StringtoHexString(byte[] input) static StringtoHexString(byte[] input, int offset, int length, boolean withPrefix) static StringtoHexStringNoPrefix(byte[] input) static StringtoHexStringNoPrefix(BigInteger value) static StringtoHexStringNoPrefixZeroPadded(BigInteger value, int size) static StringtoHexStringWithPrefix(BigInteger value) static StringDeprecated.static StringtoHexStringWithPrefixZeroPadded(BigInteger value, int size)
-
Method Details
-
encodeQuantity
-
decodeQuantity
-
parsePaddedNumberHex
-
isValidHexQuantity
-
cleanHexPrefix
-
prependHexPrefix
-
containsHexPrefix
-
toBigInt
-
toBigInt
-
toBigInt
-
toBigIntNoPrefix
-
toHexStringWithPrefix
-
toHexStringNoPrefix
-
toHexStringNoPrefix
-
toHexStringWithPrefixZeroPadded
-
toHexStringWithPrefixSafe
Deprecated.usetoHexStringNoPrefix(BigInteger value)instead, more details here -
toHexStringNoPrefixZeroPadded
-
toBytesPadded
-
hexStringToByteArray
-
toHexString
-
toHexString
-
asByte
public static byte asByte(int m, int n) -
isIntegerValue
-
removeDoubleQuotes
-
toHexStringNoPrefix(BigInteger value)instead, more details here