• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hex values format  RSS feed

 
Nikhil Bansal
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am reading a file which contains EBCIDC data.I am reading the file byte by byte. After obtaining the byte I am getting it's corresponding integer value.Now I need to get the hex values of the corresponding integer in 0x format.

Integer.toHexString is giving me values like A0,B1 etc.

Any inputs, plz share.

Regards

Nikhil
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried Character.forDigit(int value, int radix)?

 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!