package com.manning.nettyinaction.chapter7;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ReplayingDecoder;
import java.util.List;
/**
* Listing 7.2 of <i>Netty in Action</i>
*
* @author <a href="mailto:norman.maurer@googlemail.com">Norman Maurer</a>
*/
public class ToIntegerDecoder2 extends ReplayingDecoder<Void> {
@Override
public void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)
throws Exception {
out.add(in.readInt());
}
}