byte[] bytes2 = new byte[2]; ByteBuffer.wrap(bytes2).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().put(sendX);
BIG_ENDIAN
注意大小端
byte[] bytes2 = new byte[2]; ByteBuffer.wrap(bytes2).order(ByteOrder.LITTLE_ENDIAN).asShortBuffer().put(sendX);
BIG_ENDIAN
注意大小端