From a26ebc2bc1a2a85ed748296c12e997ef017f78e5 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 18 Jun 2009 12:21:46 +0000 Subject: [PATCH] Javadoc --- .../frame/LengthFieldBasedFrameDecoder.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) 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 2238384c2b..b87f9d0f17 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 @@ -38,26 +38,12 @@ import org.jboss.netty.channel.ChannelHandlerContext; * proprietary client-server protocols. Here are some example that will give * you the basic idea on which option does what. * - *

4 bytes length field at offset 0, strip header

- *
- * lengthFieldOffset   = 0
- * lengthFieldLength   = 4
- * lengthAdjustment    = 0
- * initialBytesToStrip = 4
- *
- * BEFORE DECODE (16 bytes)               AFTER DECODE (12 bytes)
- * +--------------+----------------+      +----------------+
- * | Length Field | Actual Content |----->| Actual Content |
- * |  0x0000000C  | "HELLO, WORLD" |      | "HELLO, WORLD" |
- * +--------------+----------------+      +----------------+
- * 
- * *

2 bytes length field at offset 0, do not strip header

*
  * lengthFieldOffset   = 0
  * lengthFieldLength   = 2
- * lengthAdjustment    = 0
- * initialBytesToStrip = 0
+ * lengthAdjustment    = 0 (default)
+ * initialBytesToStrip = 0 (default)
  *
  * BEFORE DECODE (14 bytes)         AFTER DECODE (14 bytes)
  * +--------+----------------+      +--------+----------------+
@@ -66,6 +52,20 @@ import org.jboss.netty.channel.ChannelHandlerContext;
  * +--------+----------------+      +--------+----------------+
  * 
* + *

2 bytes length field at offset 0, strip header

+ *
+ * lengthFieldOffset   = 0
+ * lengthFieldLength   = 2
+ * lengthAdjustment    = 0
+ * initialBytesToStrip = 2
+ *
+ * BEFORE DECODE (14 bytes)         AFTER DECODE (12 bytes)
+ * +--------+----------------+      +----------------+
+ * | Length | Actual Content |----->| Actual Content |
+ * | 0x000C | "HELLO, WORLD" |      | "HELLO, WORLD" |
+ * +--------+----------------+      +----------------+
+ * 
+ * *

3 bytes length field at the end of 5 bytes header, strip header

*
  * lengthFieldOffset   = 2 (= 5 - 3)