I know Java byte
range is -128 to 127, but C++ BYTE
is a unsigned char
(0 to 255.)
I want to convert a C++ function to Java, and in C++ I have a LPBYTE
(which is a pointer to BYTE
array.) I've tried using byte
array instead of LPBYTE
in C++ function, but my Java function is still not working correctly.
My C++ function works on a BMP file and it's algorithm is customized run length encoding. In converting it to Java I'm using a BufferedImage
and getting its content as byte[]
. I'm guessing the Java function is not working correctly because of type mismatch.
Which type should I use in Java?