byte 转长度
This commit is contained in:
parent
10d9d1b0d6
commit
02fd07def2
@ -6966,7 +6966,7 @@ public class SydApi4j implements SydApi {
|
|||||||
int isLast = bb.get();
|
int isLast = bb.get();
|
||||||
byte[] dataLenArr = new byte[2];
|
byte[] dataLenArr = new byte[2];
|
||||||
bb.get(dataLenArr);
|
bb.get(dataLenArr);
|
||||||
int dataLen = ByteUtil.bytesToInt(dataLenArr, ByteOrder.BIG_ENDIAN);
|
int dataLen = ByteUtil.bytesToShort(dataLenArr, ByteOrder.BIG_ENDIAN);
|
||||||
// byte[] data = new byte[dataLen];
|
// byte[] data = new byte[dataLen];
|
||||||
// bb.get(data);
|
// bb.get(data);
|
||||||
ByteBuffer slice = ByteBufferUtil.sliceAndConsume(bb, dataLen);
|
ByteBuffer slice = ByteBufferUtil.sliceAndConsume(bb, dataLen);
|
||||||
@ -7096,7 +7096,7 @@ public class SydApi4j implements SydApi {
|
|||||||
int isLast = bb.get();
|
int isLast = bb.get();
|
||||||
byte[] dataLenArr = new byte[2];
|
byte[] dataLenArr = new byte[2];
|
||||||
bb.get(dataLenArr);
|
bb.get(dataLenArr);
|
||||||
int dataLen = ByteUtil.bytesToInt(dataLenArr, ByteOrder.BIG_ENDIAN);
|
int dataLen = ByteUtil.bytesToShort(dataLenArr, ByteOrder.BIG_ENDIAN);
|
||||||
ByteBuffer slice = ByteBufferUtil.sliceAndConsume(bb, dataLen);
|
ByteBuffer slice = ByteBufferUtil.sliceAndConsume(bb, dataLen);
|
||||||
return new MutiReturn7(retCode, isLast, slice);
|
return new MutiReturn7(retCode, isLast, slice);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user