在java中 我有两个变量
String string;
int integerValue;
我想将这些值转换为无符号字节 那是 如何将字符串转换为UnsignedByte 和 整数到无符号字节
最佳答案
Java 没有无符号字节。
从 String 转换为 short
是通过 Short.parseShort(string)
如果您引用的是 Axis 的 UnsignedByte
类,则可以使用构造函数:
new UnsignedByte(sting);
new UnsignedByte(integerValue);
关于java - 我想将字符串和整数转换为无符号字节,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3352982/