public class HexUtils extends Object
| Constructor and Description |
|---|
HexUtils() |
| Modifier and Type | Method and Description |
|---|---|
static short |
byteToHex(byte b) |
static short |
byteToHex(int b) |
static short |
byteToHex(long b) |
static short |
byteToHexLE(byte b) |
static short |
byteToHexLE(int b) |
static short |
byteToHexLE(long b) |
static byte[] |
fromHex(String hex)
high performance
|
static byte[] |
fromHex2(String hex) |
static byte |
hexToByte(long hex) |
static byte |
hexToByte(short hex) |
static byte |
hexToByteLE(long hex) |
static byte |
hexToByteLE(short hex) |
static void |
main(String[] args) |
static String |
toHex(byte[] bytes)
high performance
|
static void |
toHex(byte[] bytes,
int offset,
int value) |
static void |
toHex(byte[] bytes,
int offset,
long value) |
static String |
toHex(ByteBuffer byteBuffer,
int offset,
int length)
high performance
|
static String |
toHex(int value) |
static String |
toHex(long value) |
static String |
toHex2(byte[] bytes)
略慢
|
public static short byteToHex(byte b)
public static short byteToHex(int b)
public static short byteToHex(long b)
public static short byteToHexLE(byte b)
public static short byteToHexLE(int b)
public static short byteToHexLE(long b)
public static byte hexToByte(short hex)
public static byte hexToByteLE(short hex)
public static byte hexToByte(long hex)
public static byte hexToByteLE(long hex)
public static String toHex2(byte[] bytes)
bytes - public static String toHex(byte[] bytes)
bytes - public static void toHex(byte[] bytes,
int offset,
int value)
public static void toHex(byte[] bytes,
int offset,
long value)
public static String toHex(int value)
public static String toHex(long value)
public static String toHex(ByteBuffer byteBuffer, int offset, int length)
byteBuffer - offset - length - public static byte[] fromHex(String hex)
hex - public static byte[] fromHex2(String hex)
public static void main(String[] args) throws UnsupportedEncodingException
UnsupportedEncodingExceptionCopyright © 2019. All rights reserved.