I am tring to convert a set of strings to a byte[] array. At first, I do something like this to convert a byte array to a string:
public String convertByte(byte[
If you are certain the String will be small enough to fit in one byte, you could do
st[i].getBytes()[0];
however, in most of the cases, your String will probably be bigger, so in these cases it is not possible...