Files
Java-Tutorials/libraries/src/main/java/com/baeldung/netty/ResponseDataEncoder.java
T
Anton 4732baccab BAEL-768 Introduction to Netty (#1933)
* 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
2017-06-07 07:52:23 +02:00

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());
}
}