-
Notifications
You must be signed in to change notification settings - Fork 408
Open
Description
为啥我从serialPort.getInputStream() 拿到的数据最多只能拿到32个字节
while (!isInterrupted()) {
try {
if (mInputStream == null) {
return;
}
int available = mInputStream.available();
byte[] buffer = new byte[available];
int size = mInputStream.read(buffer);
if (size > 0) {
if (null != callback) {
callback.callback(buffer);
}
}
} catch (IOException e) {
e.printStackTrace();
return;
}
}
我这里如果改成比32大的byte[] ,32位之后的数据全是0
Metadata
Metadata
Assignees
Labels
No labels