* BAEL-748 quick guide to @Value * BAEL-748 changes from review * BAEL-748 inject comma-separated values into array * BAEL-768 Introduction to Netty * BAEL-768 remove commented code
14 lines
406 B
Java
14 lines
406 B
Java
package com.baeldung.netty;
|
|
|
|
import io.netty.buffer.ByteBuf;
|
|
import io.netty.channel.ChannelHandlerContext;
|
|
import io.netty.handler.codec.MessageToByteEncoder;
|
|
|
|
public class ResponseDataEncoder extends MessageToByteEncoder<ResponseData> {
|
|
|
|
@Override
|
|
protected void encode(ChannelHandlerContext ctx, ResponseData msg, ByteBuf out) throws Exception {
|
|
out.writeInt(msg.getIntValue());
|
|
}
|
|
}
|