mysql-protocol icon indicating copy to clipboard operation
mysql-protocol copied to clipboard

a lib for mysql protocol operation

Results 4 mysql-protocol issues
Sort by recently updated
recently updated
newest added

``` public static final void writeUB3(ByteBuffer buffer, int i) { buffer.put((byte) (i & 0xff)); buffer.put((byte) (i >>> 8)); buffer.put((byte) (i >>> 16)); } ``` 不明白,为什么int转为byte类型还需要用 i&0xff呢? 我的理解是因为(byte)的强制转化是针对int类型的低8位的,所以就算i没有进行 &0xff的操作,也是不会影响到该值的吧。 所以高字节的int转低字节的byte是不是可以写成: ```...

请问我现在捕获到了mysql的通讯数据包,mysql-protocl怎么用

public static final void writeLong(ByteBuffer buffer, long l) { buffer.put((byte) (l & 0xff)); buffer.put((byte) (l >>> 8)); buffer.put((byte) (l >>> 16)); buffer.put((byte) (l >>> 24)); buffer.put((byte) (l >>> 32)); buffer.put((byte)...