public class ByteArrayConvertor extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static char[] |
hexArray |
static Charset |
UTF8_CHARSET |
| Constructor and Description |
|---|
ByteArrayConvertor() |
| Modifier and Type | Method and Description |
|---|---|
static String |
byteArrayToHex(byte[] a) |
static int |
byteArrayToInt(byte[] bytes) |
static long |
byteArrayToLong(byte[] bytes) |
static String |
bytesToHex(byte[] bytes,
String separator,
boolean skipZero) |
static String |
bytesToHexMultiline(byte[] bytes,
String prefix) |
static byte[] |
hexStringToBytes(String s) |
static int |
intFrom2Octets(byte[] bytes) |
static byte[] |
intTo2Octet(int value) |
static byte[] |
intToByteArray(int value) |
static long |
longFrom4Octets(byte[] bytes) |
static byte[] |
longTo4Octets(long value) |
static byte[] |
longToByteArray(long value) |
static UUID |
uuidFromByteArray(byte[] b) |
static byte[] |
uuidToByteArray(UUID serviceId) |
public static final Charset UTF8_CHARSET
protected static final char[] hexArray
public static final byte[] intToByteArray(int value)
public static final int byteArrayToInt(byte[] bytes)
public static final byte[] intTo2Octet(int value)
public static int intFrom2Octets(byte[] bytes)
public static final byte[] longTo4Octets(long value)
public static final byte[] longToByteArray(long value)
public static final long byteArrayToLong(byte[] bytes)
public static long longFrom4Octets(byte[] bytes)
public static String byteArrayToHex(byte[] a)
public static byte[] uuidToByteArray(UUID serviceId)
public static UUID uuidFromByteArray(byte[] b)
public static byte[] hexStringToBytes(String s)
Copyright © 2018. All rights reserved.