public final class Numeric extends Object
Message codec functions.
Implementation as per https://github.com/ethereum/wiki/wiki/JSON-RPC#hex-value-encoding
| 限定符和类型 | 方法和说明 |
|---|---|
static byte |
asByte(int m,
int n) |
static String |
cleanHexPrefix(String input) |
static boolean |
containsHexPrefix(String input) |
static byte[] |
hexStringToByteArray(String input) |
static boolean |
isIntegerValue(BigDecimal value) |
static String |
prependHexPrefix(String input) |
static BigInteger |
toBigInt(byte[] value) |
static BigInteger |
toBigInt(byte[] value,
int offset,
int length) |
static BigInteger |
toBigInt(String hexValue) |
static BigInteger |
toBigIntNoPrefix(String hexValue) |
static byte[] |
toBytesPadded(BigInteger value,
int length) |
static String |
toHexString(byte[] input) |
static String |
toHexString(byte[] input,
int offset,
int length,
boolean withPrefix) |
static String |
toHexStringNoPrefix(BigInteger value) |
static String |
toHexStringNoPrefix(byte[] input) |
static String |
toHexStringNoPrefixZeroPadded(BigInteger value,
int size) |
static String |
toHexStringWithPrefix(BigInteger value) |
static String |
toHexStringWithPrefixZeroPadded(BigInteger value,
int size) |
public static boolean containsHexPrefix(String input)
public static BigInteger toBigInt(byte[] value, int offset, int length)
public static BigInteger toBigInt(byte[] value)
public static BigInteger toBigInt(String hexValue)
public static BigInteger toBigIntNoPrefix(String hexValue)
public static String toHexStringWithPrefix(BigInteger value)
public static String toHexStringNoPrefix(BigInteger value)
public static String toHexStringNoPrefix(byte[] input)
public static String toHexStringWithPrefixZeroPadded(BigInteger value, int size)
public static String toHexStringNoPrefixZeroPadded(BigInteger value, int size)
public static byte[] toBytesPadded(BigInteger value, int length)
public static byte[] hexStringToByteArray(String input)
public static String toHexString(byte[] input, int offset, int length, boolean withPrefix)
public static String toHexString(byte[] input)
public static byte asByte(int m,
int n)
public static boolean isIntegerValue(BigDecimal value)
Copyright © 2022. All rights reserved.