List of usage examples for io.netty.buffer ByteBuf setLong
public abstract ByteBuf setLong(int index, long value);
From source file:com.talent.mysql.packet.request.AuthPacket.java
License:Open Source License
@Override public void encodeBody(ByteBuf byteBuf) { int index = byteBuf.readerIndex(); String xx = Long.toBinaryString(clientFlags); byteBuf.setLong(index, clientFlags); index += 4;//w ww . j a v a 2 s. c o m byteBuf.setLong(index, maxPacketSize); index += 4; byteBuf.setByte(index, charsetIndex); index++; byteBuf.setBytes(index, extra); index += extra.length; byteBuf.setBytes(index, user); index += user.length; byteBuf.setByte(index, 0); index++; byteBuf.setByte(index, passwordLen); index++; byteBuf.setBytes(index, password); index += password.length; byteBuf.setBytes(index, database); index += database.length; byteBuf.setByte(index, 0); index++; }