In java i have two variables
String string; int integerValue;
I want to convert these values to unsignedbyte that is How to convert string to UnsignedByte and integer to UnsignedByte
In java i have two variables
String string; int integerValue;
I want to convert these values to unsignedbyte that is How to convert string to UnsignedByte and integer to UnsignedByte
Java does not have type like unsigned byte, you have to use larger short for this (for unsigned int it has to be long).
short s = (short) integerValue;
Java does not have an unsigned byte.
Converting from String to short
is done by Short.parseShort(string)
If you are referring to Axis's UnsignedByte
class, you can use the constructors:
new UnsignedByte(sting);
new UnsignedByte(integerValue);