我想将字符串和整数转换为无符号字节 [英] i want to convert string and integer to unsigned byte
本文介绍了我想将字符串和整数转换为无符号字节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Java中 我有两个变量
In java i have two variables
String string;
int integerValue;
我想将这些值转换为unsignedbyte 那是 如何将字符串转换为UnsignedByte 和 整数到UnsignedByte
I want to convert these values to unsignedbyte that is How to convert string to UnsignedByte and integer to UnsignedByte
推荐答案
Java没有无符号字节.
Java does not have an unsigned byte.
从字符串转换为short
由Short.parseShort(string)
如果要引用Axis的UnsignedByte
类,则可以使用构造函数:
If you are referring to Axis's UnsignedByte
class, you can use the constructors:
new UnsignedByte(sting);
new UnsignedByte(integerValue);
这篇关于我想将字符串和整数转换为无符号字节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文