public class BinaryUtil extends Object
| Constructor and Description |
|---|
BinaryUtil() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getBytes(String text)
Get UTF-8 without BOM encoded bytes from String
|
static byte[] |
loadBytesFromFile(File file)
load from file
|
static void |
memcopy(byte[] dest,
byte[] src,
int copyToIndex)
Copy src bytes[] into dest bytes[]
|
static void |
print(byte[] array)
Pretty print byte[] with Ascii char and subscript of the array
|
static void |
printWithAscii(byte[] array)
Pretty print byte[] with Ascii char
|
static void |
printWithAsciiWithIndex(byte[] array)
Pretty print byte[] with Ascii char and subscript of the array
|
static void |
saveBytesToFile(byte[] data,
File file)
save to file
|
public static byte[] getBytes(String text)
text - public static void memcopy(byte[] dest,
byte[] src,
int copyToIndex)
dest - src - copyToIndex - public static byte[] loadBytesFromFile(File file)
file - public static void saveBytesToFile(byte[] data,
File file)
data - file - public static void print(byte[] array)
array - public static void printWithAscii(byte[] array)
array - public static void printWithAsciiWithIndex(byte[] array)
array - Copyright © 2016. All rights reserved.