From 038bcfc4ffda87735602d402b615869f5686114d Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Thu, 6 Dec 2012 20:57:08 +0100 Subject: [PATCH] [#792] Implement freeInboundBuffer(...) and freeOutboundBuffer(...) methods in ByteToByteCodec --- .../java/io/netty/handler/codec/ByteToByteCodec.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/codec/src/main/java/io/netty/handler/codec/ByteToByteCodec.java b/codec/src/main/java/io/netty/handler/codec/ByteToByteCodec.java index 9f4fb4d565..b927f8073c 100644 --- a/codec/src/main/java/io/netty/handler/codec/ByteToByteCodec.java +++ b/codec/src/main/java/io/netty/handler/codec/ByteToByteCodec.java @@ -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;