public class HexString
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static void |
appendFromByte(byte b,
java.lang.StringBuilder builder) |
|
static void |
appendFromBytes(java.lang.StringBuilder builder,
byte[] bytes,
int offset,
int length) |
|
static java.lang.String |
fromByte(byte b) |
Returns the byte as a hex string.
|
static java.lang.String |
fromByte(int b) |
|
static java.lang.String |
fromBytes(byte[] bytes) |
|
static java.lang.String |
fromBytes(byte[] bytes,
int offset,
int length) |
|
static java.lang.String |
fromBytes(java.nio.ByteBuffer buffer) |
|
static java.lang.String |
fromBytesFormatted(byte[] bytes) |
|
static java.lang.String |
fromBytesFormatted(byte[] bytes,
int offset,
int length) |
|
static java.lang.String |
fromInt(int i) |
Returns the integer value as hex string filled with leading zeros.
|
static java.lang.String |
fromLong(long l) |
Returns the long value as hex string filled with leading zeros.
|
static byte[] |
toBytes(java.lang.String hexString) |
Converts the given hex string to a byte array.
|
public static java.lang.String fromByte(byte b)
b - the byte to be convertedpublic static java.lang.String fromByte(int b)
public static java.lang.String fromInt(int i)
i - the integer value to be convertedpublic static java.lang.String fromLong(long l)
l - the long value to be convertedpublic static java.lang.String fromBytes(byte[] bytes)
public static java.lang.String fromBytesFormatted(byte[] bytes)
public static java.lang.String fromBytes(byte[] bytes,
int offset,
int length)
public static java.lang.String fromBytes(java.nio.ByteBuffer buffer)
public static java.lang.String fromBytesFormatted(byte[] bytes,
int offset,
int length)
public static byte[] toBytes(java.lang.String hexString)
hexString - the hex stringjava.lang.NumberFormatException - if the string is not a valid hex stringpublic static void appendFromByte(byte b,
java.lang.StringBuilder builder)
public static void appendFromBytes(java.lang.StringBuilder builder,
byte[] bytes,
int offset,
int length)