public final class Numeric
extends java.lang.Object
Implementation as per https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding
Modifier and Type | Method and Description |
---|---|
static byte |
asByte(int m,
int n) |
static java.lang.String |
cleanHexPrefix(java.lang.String input) |
static boolean |
containsHexPrefix(java.lang.String input) |
static java.math.BigInteger |
decodeQuantity(java.lang.String value) |
static java.lang.String |
encodeQuantity(java.math.BigInteger value) |
static byte[] |
hexStringToByteArray(java.lang.String input) |
static boolean |
isIntegerValue(java.math.BigDecimal value) |
static java.lang.String |
prependHexPrefix(java.lang.String input) |
static java.math.BigInteger |
toBigInt(byte[] value) |
static java.math.BigInteger |
toBigInt(byte[] value,
int offset,
int length) |
static java.math.BigInteger |
toBigInt(java.lang.String hexValue) |
static java.math.BigInteger |
toBigIntNoPrefix(java.lang.String hexValue) |
static byte[] |
toBytesPadded(java.math.BigInteger value,
int length) |
static java.lang.String |
toHexString(byte[] input) |
static java.lang.String |
toHexString(byte[] input,
int offset,
int length,
boolean withPrefix) |
static java.lang.String |
toHexStringNoPrefix(java.math.BigInteger value) |
static java.lang.String |
toHexStringNoPrefix(byte[] input) |
static java.lang.String |
toHexStringNoPrefixZeroPadded(java.math.BigInteger value,
int size) |
static java.lang.String |
toHexStringWithPrefix(java.math.BigInteger value) |
static java.lang.String |
toHexStringWithPrefixSafe(java.math.BigInteger value) |
static java.lang.String |
toHexStringWithPrefixZeroPadded(java.math.BigInteger value,
int size) |
public static java.lang.String encodeQuantity(java.math.BigInteger value)
public static java.math.BigInteger decodeQuantity(java.lang.String value)
public static java.lang.String cleanHexPrefix(java.lang.String input)
public static java.lang.String prependHexPrefix(java.lang.String input)
public static boolean containsHexPrefix(java.lang.String input)
public static java.math.BigInteger toBigInt(byte[] value, int offset, int length)
public static java.math.BigInteger toBigInt(byte[] value)
public static java.math.BigInteger toBigInt(java.lang.String hexValue)
public static java.math.BigInteger toBigIntNoPrefix(java.lang.String hexValue)
public static java.lang.String toHexStringWithPrefix(java.math.BigInteger value)
public static java.lang.String toHexStringNoPrefix(java.math.BigInteger value)
public static java.lang.String toHexStringNoPrefix(byte[] input)
public static java.lang.String toHexStringWithPrefixZeroPadded(java.math.BigInteger value, int size)
public static java.lang.String toHexStringWithPrefixSafe(java.math.BigInteger value)
public static java.lang.String toHexStringNoPrefixZeroPadded(java.math.BigInteger value, int size)
public static byte[] toBytesPadded(java.math.BigInteger value, int length)
public static byte[] hexStringToByteArray(java.lang.String input)
public static java.lang.String toHexString(byte[] input, int offset, int length, boolean withPrefix)
public static java.lang.String toHexString(byte[] input)
public static byte asByte(int m, int n)
public static boolean isIntegerValue(java.math.BigDecimal value)