package chat.util; import io.netty.buffer.ByteBuf; public class BytesSelfUtil { public static byte[] getReadableBytes(ByteBuf ackPayload) { byte[] resBytes = new byte[ackPayload.readableBytes()]; ackPayload.getBytes(0, resBytes); return resBytes; } }