byte array to decimal convertion in java

前端 未结 4 1035
傲寒
傲寒 2020-12-22 03:59

I am new to java. I receive the UDP data in byte array. Each elements of the byte array have the hexadecimal value. I need to convert each element to integer.

How to

4条回答
  •  醉梦人生
    2020-12-22 04:38

    Manually: Iterate over the elements of the array and cast them to int or use Integer.valueOf() to create integer objects.

提交回复
热议问题