Pergunta

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).

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top