public interface Base
| Modifier and Type | Method and Description |
|---|---|
byte[] |
bytes(java.lang.String s)
Convert a string to directly bytes.
|
byte[] |
removeNulls(byte[] bs)
Remove all the null bytes from the
end of a byte array.
|
<T> T |
res(int res,
T object) |
java.lang.String |
str(byte[] bs)
Converts a byte array to a string
using a charset.
|
java.lang.String |
str(byte[] bs,
java.nio.charset.Charset charset)
Convert a byte array to a string with a charset.
|
boolean |
successful(int res) |
boolean |
wrongLen(byte[] bs,
int shouldBeLen) |
boolean |
wrongLen(int byteLength,
int shouldBeLen) |
boolean |
wrongLen(int byteLength,
long shouldBeLen) |
boolean successful(int res)
<T> T res(int res,
T object)
java.lang.String str(byte[] bs)
Helpers.Lazy.sodiumBin2Hex(byte[])
to convert your byte array to a hexadecimal string that ensures no nulls or carriage breaks.bs - The byte array.java.lang.String str(byte[] bs,
java.nio.charset.Charset charset)
Helpers.Lazy.sodiumBin2Hex(byte[])
to convert your byte array to a hexadecimal string that ensures no nulls or carriage breaks.bs - Byte array.charset - The charset.byte[] bytes(java.lang.String s)
s - The String to convert to a byte array.s.boolean wrongLen(byte[] bs,
int shouldBeLen)
boolean wrongLen(int byteLength,
int shouldBeLen)
boolean wrongLen(int byteLength,
long shouldBeLen)
byte[] removeNulls(byte[] bs)
bs - A byte array.