diff --git a/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java b/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java index 55d2998cdf..1516c151d6 100644 --- a/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/frame/FrameDecoder.java @@ -124,16 +124,20 @@ import org.jboss.netty.channel.SimpleChannelHandler; * ChannelBuffer frame = buf.readBytes(length); * * // Successfully decoded a frame. Return the decoded frame. - * // Please note that you can return a different type than - * // {@link ChannelBuffer} although this example returns a {@link ChannelBuffer}. - * // For example, you could return a POJO here so that the next - * // {@link ChannelUpstreamHandler} receives a {@link MessageEvent} which contains - * // a POJO rather than a {@link ChannelBuffer}. * return frame; * } * } * * + *

Returning a POJO rather than a {@link ChannelBuffer}

+ *

+ * Please note that you can return an object of a different type than + * {@link ChannelBuffer} in your {@code decode()} and {@code decodeLast()} + * implementation. For example, you could return a + * POJO so that the next + * {@link ChannelUpstreamHandler} receives a {@link MessageEvent} which + * contains a POJO rather than a {@link ChannelBuffer}. + * * @author The Netty Project (netty-dev@lists.jboss.org) * @author Trustin Lee (tlee@redhat.com) *