public class EncoderUtils
extends java.lang.Object
Constructor and Description |
---|
EncoderUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
changeToBitString(byte[] textToSend)
Casts a byte array to bit and checks for characters with more than one byte.
|
java.lang.String |
getStringOfEncodedBits(byte[] textToSend,
SoniTalkConfig config)
Uses byte array length check and returns the casted bit sequence or Exception.
|
static boolean |
isAllowedByteArraySize(byte[] textToSend,
SoniTalkConfig config)
Checks if the byte array does not exceed the number of allowed bytes.
|
public static java.lang.String changeToBitString(byte[] textToSend)
textToSend
- text to cast and checkpublic java.lang.String getStringOfEncodedBits(byte[] textToSend, SoniTalkConfig config)
textToSend
- text to checkconfig
- SoniTalkConfig to get number of message blockspublic static boolean isAllowedByteArraySize(byte[] textToSend, SoniTalkConfig config)
textToSend
- byte array to checkconfig
- SoniTalkConfig to get number of message blocks