public class ByteArrayConvertor extends Object
| Modifier and Type | Field and Description |
|---|---|
static Charset |
UTF8_CHARSET |
| Constructor and Description |
|---|
ByteArrayConvertor() |
| Modifier and Type | Method and Description |
|---|---|
static int |
byteArrayToInt(byte[] bytes,
int offset) |
static long |
byteArrayToLong(byte[] bytes,
int offset) |
static byte[] |
hexStringToByteArray(String s) |
static int |
intFrom2Octets(byte[] bytes,
int offset) |
static byte[] |
intTo2Octet(int value) |
static byte[] |
intToByteArray(int value) |
static void |
intToByteArray(int value,
byte[] buf,
int offset) |
static long |
longFrom4Octets(byte[] bytes,
int offset) |
static byte[] |
longTo4Octets(long value) |
static byte[] |
longToByteArray(long value) |
static String |
stringFromByteArrayEncoded(byte[] b,
int offset) |
static byte[] |
stringToByteArrayEncoded(String v) |
static String |
toHexString(byte[] bytes) |
public static final Charset UTF8_CHARSET
public static final void intToByteArray(int value,
byte[] buf,
int offset)
public static final byte[] intToByteArray(int value)
public static final int byteArrayToInt(byte[] bytes,
int offset)
public static final byte[] intTo2Octet(int value)
public static int intFrom2Octets(byte[] bytes,
int offset)
public static final byte[] longTo4Octets(long value)
public static final byte[] longToByteArray(long value)
public static final long byteArrayToLong(byte[] bytes,
int offset)
public static long longFrom4Octets(byte[] bytes,
int offset)
public static byte[] hexStringToByteArray(String s)
public static String toHexString(byte[] bytes)
public static byte[] stringToByteArrayEncoded(String v)
public static String stringFromByteArrayEncoded(byte[] b, int offset)
Copyright © 2018. All rights reserved.