public abstract static class Utils.ByteUtils
extends java.lang.Object
| Constructor and Description |
|---|
ByteUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
compress(byte[] input)
Compresses a byte array.
|
static byte[] |
decompress(byte[] input)
Decompresses a byte array.
|
static byte[] |
decrypt(byte[] input,
java.lang.String key) |
static byte[] |
encrypt(byte[] input,
java.lang.String key) |
static java.lang.String |
getMd5(byte[] input)
Generates an MD5 hash from the provided byte array.
|
int |
unsignedByteToInt(byte b)
Converts an unsigned byte to an int.
|
public static byte[] compress(byte[] input)
input - the byte array to compress.public static byte[] decompress(byte[] input)
input - the compressed array to decompress.public static byte[] encrypt(byte[] input,
java.lang.String key)
public static byte[] decrypt(byte[] input,
java.lang.String key)
public static java.lang.String getMd5(byte[] input)
input - the byte array you want to turn into an MD5 hash.public int unsignedByteToInt(byte b)
b - the unsigned byte.