public final class ByteUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
bytesToPositiveNumber(byte[] bytes,
String separator)
字节转换成字符串
|
static int |
hashCode(byte[] value) |
static byte[] |
hexStringToBytes(String source,
ByteOrder order)
16进制字符串转换为数组
|
static void |
printBytesInline(byte[] bytes,
String separator,
boolean needReverse)
输出字节数组
|
static void |
printBytesSimple(byte[] bytes)
输出字节数组
|
static void |
printIntsInline(int[] ints,
String separator,
boolean needReverse) |
static byte[] |
stringsToBytes(String source,
String separator)
字符串转化数组
|
public static String bytesToPositiveNumber(byte[] bytes, String separator)
bytes - 要转换的字节数组separator - 分隔符192.168.1.100public static byte[] stringsToBytes(String source, String separator)
source - 要转换的字符串separator - 分隔符[192,168,1,100]public static byte[] hexStringToBytes(String source, ByteOrder order)
source - xxxorder - xxxpublic static void printBytesInline(byte[] bytes,
String separator,
boolean needReverse)
bytes - xxxseparator - xxxneedReverse - xxxpublic static void printIntsInline(int[] ints,
String separator,
boolean needReverse)
public static void printBytesSimple(byte[] bytes)
bytes - xxxpublic static int hashCode(byte[] value)
Copyright © 2019. All rights reserved.