java: fastest way of converting a bye array byte [1000] to array int[500]
-
30-10-2019 - |
题
The goal is to convert every pair of bytes as a single unsigned 16bit int. In C I would define an array[500] of 16bit unsinged int pointer and would point it the the array of bytes, but in java I am not aware of such short cut. I know in Java there is no 16bit data type except char, however that is not an issue. We only need to copy every two consecutive two bytes into a single int of an array of integers. So the array of integer holds values of int ranging from 0 to 65535 (2^16-1).
没有正确的解决方案
不隶属于 StackOverflow