-1
這可能是一個簡單的問題,但我找不到答案。如何讀取java中的十六進制整數
我試圖讀取十六進制7B
,並將其轉換爲它的十進制整數(123),或至少收到字符串7B
。
我的代碼:在logcat的
byte[] content = new byte[numCharsToRead];
while ((numBytesRead = bufferedInputStream.read(content, 0,
numCharsToRead)) != -1) {
String temp=new String(content);
Log.d("RS232",""+temp);
輸出: