Browse Source

fix an error in socketHelper.java

module-tcpserver-mqtt-t4j-faceSDK
zmt 3 years ago
parent
commit
2817991ef4
  1. 2
      uniapp示例工程源码/unipluginDemo/pages/index/index.vue
  2. 5
      zmt_module/src/main/java/io/dcloud/zmt_module/SocketHelper.java

2
uniapp示例工程源码/unipluginDemo/pages/index/index.vue

@ -31,7 +31,7 @@
return {
list: [{
id: 'ext-module',
name: '扩展 module',
name: '扩展 module测试列表',
open: false,
url: '/pages/sample/ext-module'
},

5
zmt_module/src/main/java/io/dcloud/zmt_module/SocketHelper.java

@ -24,8 +24,9 @@ public class SocketHelper {
public static byte[] toIntByteArray(InputStream in) throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte[] buffer = new byte[100];
System.out.println("zmt-toIntByteArray--" + buffer[0] + buffer[1] + buffer[2] + buffer[3] + buffer[4] + buffer[5] + " " + Arrays.toString(buffer));
System.out.println("zmt-toIntByteArray--" + buffer[0] + buffer[1] + buffer[2] + buffer[3] + buffer[4] + buffer[5] + " " + Arrays.toString(buffer)
);
// +new String(buffer.array()
int n = 0;
while ((n = in.read(buffer)) != -1) {
out.write(buffer, 0, n);

Loading…
Cancel
Save