java.lang.Object
it.auties.whatsapp.util.BytesHelper
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbytesToCrockford(byte[] bytes) static intbytesToInt(byte[] bytes, int length) static MessageContainerbytesToMessage(byte[] bytes) static intbytesToVersion(byte version) static byte[]compress(byte[] uncompressed) static byte[]concat(byte[]... entries) static byte[]concat(byte[] first, byte[] second) static byte[]concat(byte first, byte[] second) static byte[]decompress(byte[] compressed) static byte[]decompress(byte[] compressed, int offset, int length) static byte[]intToBytes(int input, int length) static byte[]intToVarInt(int value) static byte[]longToBytes(long number) static byte[]messageToBytes(Message message) static byte[]messageToBytes(MessageContainer container) static byte[]random(int length) static byteversionToBytes(int version)
-
Field Details
-
CROCKFORD_CHARACTERS
- See Also:
-
-
Constructor Details
-
BytesHelper
public BytesHelper()
-
-
Method Details
-
random
public static byte[] random(int length) -
concat
public static byte[] concat(byte[]... entries) -
concat
public static byte[] concat(byte first, byte[] second) -
concat
public static byte[] concat(byte[] first, byte[] second) -
versionToBytes
public static byte versionToBytes(int version) -
bytesToVersion
public static int bytesToVersion(byte version) -
compress
public static byte[] compress(byte[] uncompressed) -
decompress
public static byte[] decompress(byte[] compressed) -
decompress
public static byte[] decompress(byte[] compressed, int offset, int length) -
messageToBytes
-
messageToBytes
-
bytesToMessage
-
longToBytes
public static byte[] longToBytes(long number) -
intToBytes
public static byte[] intToBytes(int input, int length) -
bytesToInt
public static int bytesToInt(byte[] bytes, int length) -
bytesToCrockford
-
intToVarInt
public static byte[] intToVarInt(int value)
-