
String to byte array
Publicado por jvb2008 (8 intervenciones) el 08/04/2016 09:44:43
Hello all,
I need to convert a string into byte array like this:
For example, having this string:
I would like to get the following:
How can I solve this?
Thanks so much!
I need to convert a string into byte array like this:
For example, having this string:
1
String s = "80008100FFFFFFFF";
I would like to get the following:
1
2
3
4
5
6
7
8
9
10
ArrayList<Byte> data = null;
data = new ArrayList<Byte>();
data.add((byte) (0x80));
data.add((byte) (0x00));
data.add((byte) (0x81));
data.add((byte) (0x00));
data.add((byte) (0xFF));
data.add((byte) (0xFF));
data.add((byte) (0xFF));
data.add((byte) (0xFF));
How can I solve this?
Thanks so much!
Valora esta pregunta


0