[#792] Implement freeInboundBuffer(...) and freeOutboundBuffer(...) methods in ByteToByteCodec

This commit is contained in:
Norman Maurer 2012-12-06 20:57:08 +01:00
parent 16b05def59
commit 038bcfc4ff

View File

@ -16,6 +16,7 @@
package io.netty.handler.codec;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ChannelBuf;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
@ -65,6 +66,16 @@ public abstract class ByteToByteCodec
encoder.flush(ctx, future);
}
@Override
public void freeInboundBuffer(ChannelHandlerContext ctx, ChannelBuf buf) throws Exception {
decoder.freeInboundBuffer(ctx, buf);
}
@Override
public void freeOutboundBuffer(ChannelHandlerContext ctx, ChannelBuf buf) throws Exception {
encoder.freeOutboundBuffer(ctx, buf);
}
public abstract void encode(
ChannelHandlerContext ctx,
ByteBuf in, ByteBuf out) throws Exception;