Fixed the toUnsignedByte method, of course it needs to be a short in JAVA to store 0-255
Fixed the unsigned bytes to short as it should be in JAVA