How to draw byte array data to screen ?

B

Boki

Hi All,

I have a data array.

I want to draw it to screen and with HEX format.

could you please advice ?

I am C and VB programmer, really tired about everytime just to convert
a type.... is so diffcult.

Best regards,
Boki.
 
S

sgoo

This is what I do

char[] hex = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A',
'B', 'C', 'D', 'E', 'F'};

Then the HEX format for a byte b is:

""+hex[(b+256)/16%16]+hex[(b+256)%16]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top