diff --git a/src/main/java/org/jboss/netty/handler/codec/frame/LengthFieldBasedFrameDecoder.java b/src/main/java/org/jboss/netty/handler/codec/frame/LengthFieldBasedFrameDecoder.java index 03d052d7f3..cab823d2ac 100644 --- a/src/main/java/org/jboss/netty/handler/codec/frame/LengthFieldBasedFrameDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/frame/LengthFieldBasedFrameDecoder.java @@ -55,7 +55,8 @@ import org.jboss.netty.channel.ChannelHandlerContext; * Because we can get the length of the content by calling * {@link ChannelBuffer#readableBytes()}, you might want to strip the length * field by specifying initialBytesToStrip. In this example, we - * specified 2, that is same with the length of the length field. + * specified 2, that is same with the length of the length field, to + * strip the first two bytes. *
  * lengthFieldOffset   = 0
  * lengthFieldLength   = 2
@@ -96,8 +97,8 @@ import org.jboss.netty.channel.ChannelHandlerContext;
  *
  * The following message is a simple variation of the first example.  An extra
  * header value is prepended to the message.  lengthAdjustment is zero
- * again because the decoder always counts the length of the prepended data into
- * frame length calculation.
+ * again because the decoder always takes the length of the prepended data into
+ * account during frame length calculation.
  * 
  * lengthFieldOffset   = 2 (= the length of Header 1)
  * lengthFieldLength   = 3
@@ -113,8 +114,8 @@ import org.jboss.netty.channel.ChannelHandlerContext;
  *
  * 

3 bytes length field at the beginning of 5 bytes header, do not strip header

* - * This is an advanced example that shows a case where there is an extra header - * between the length field and the message body. You have to specify a + * This is an advanced example that shows the case where there is an extra + * header between the length field and the message body. You have to specify a * positive lengthAdjustment so that the decoder counts the extra * header into the frame length calculation. *