String para byte

Gente

Eu tenho uma array de string {0xA2, 0x4E, 0x7E} (exemplo…)
Como faço pra transformar isso em um byte[]?
Já tentei Byte.parseByte, to pesquisando aqui mas não encontrei nada a respeito.
Sempre q tento converter ele gera uma exception

Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "A2"

help?

Você tem de usar:

byte b = (byte) (Integer.parseInt ("A2", 16));

thingol muito obrigado era isso mesmo que queria !! :smiley: