Bom dia
tenho uma String
String teste = "CCD4C5D3D4C5"
a cada 2 caracter tenho que tranforma em um byte exempo:
“CC” em (byte) 0xCC
“D4” em (byte) 0xD4
e assim por diante.
sds
j.silvestre
Bom dia
tenho uma String
String teste = "CCD4C5D3D4C5"
a cada 2 caracter tenho que tranforma em um byte exempo:
“CC” em (byte) 0xCC
“D4” em (byte) 0xD4
e assim por diante.
sds
j.silvestre
http://docs.oracle.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String,%20int)
Exemplo:
byte b = (byte) Integer.parseInt ("CC", 16);
Valeu
entanglement .
sds
j.silvestre