public class HexString extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
appendFromByte(byte b,
StringBuilder builder) |
static void |
appendFromBytes(StringBuilder builder,
byte[] bytes,
int offset,
int length) |
static String |
fromByte(byte b)
Returns the byte as a hex string.
|
static String |
fromByte(int b) |
static String |
fromBytes(byte[] bytes) |
static String |
fromBytes(byte[] bytes,
int offset,
int length) |
static String |
fromBytes(ByteBuffer buffer) |
static String |
fromBytesFormatted(byte[] bytes) |
static String |
fromBytesFormatted(byte[] bytes,
int offset,
int length) |
static String |
fromInt(int i)
Returns the integer value as hex string filled with leading zeros.
|
static String |
fromLong(long l)
Returns the long value as hex string filled with leading zeros.
|
static byte[] |
toBytes(String hexString)
Converts the given hex string to a byte array.
|
public static String fromByte(byte b)
b - the byte to be convertedpublic static String fromByte(int b)
public static String fromInt(int i)
i - the integer value to be convertedpublic static String fromLong(long l)
l - the long value to be convertedpublic static String fromBytes(byte[] bytes)
public static String fromBytesFormatted(byte[] bytes)
public static String fromBytes(byte[] bytes, int offset, int length)
public static String fromBytes(ByteBuffer buffer)
public static String fromBytesFormatted(byte[] bytes, int offset, int length)
public static byte[] toBytes(String hexString)
hexString - the hex stringNumberFormatException - if the string is not a valid hex stringpublic static void appendFromByte(byte b,
StringBuilder builder)
public static void appendFromBytes(StringBuilder builder, byte[] bytes, int offset, int length)
Copyright © 2025. All rights reserved.