There are some data types which are present in C but not available in Java. I have listed some of them and written their substitute in Java. Please suggest if i have done it correctly or some changes should be made:
unsigned char -> short
unsigned short -> int
unsigned char *x -> short[] x
unsigned short *x -> int[] x
char *x -> String
unsigned int -> long
For
unsigned charyou should use Java’schar, which is also unsigned. The others are OK inasmuch as they are injective (assuming commonly used sizes in C), i.e. they will preserve values, though the matter is rather more complicated with pointers/arrays.