Improved javadoc
This commit is contained in:
parent
e069c7c958
commit
0180db1c2c
@ -55,7 +55,8 @@ import org.jboss.netty.channel.ChannelHandlerContext;
|
|||||||
* Because we can get the length of the content by calling
|
* Because we can get the length of the content by calling
|
||||||
* {@link ChannelBuffer#readableBytes()}, you might want to strip the length
|
* {@link ChannelBuffer#readableBytes()}, you might want to strip the length
|
||||||
* field by specifying <tt>initialBytesToStrip</tt>. In this example, we
|
* field by specifying <tt>initialBytesToStrip</tt>. In this example, we
|
||||||
* specified <tt>2</tt>, that is same with the length of the length field.
|
* specified <tt>2</tt>, that is same with the length of the length field, to
|
||||||
|
* strip the first two bytes.
|
||||||
* <pre>
|
* <pre>
|
||||||
* lengthFieldOffset = 0
|
* lengthFieldOffset = 0
|
||||||
* lengthFieldLength = 2
|
* 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
|
* The following message is a simple variation of the first example. An extra
|
||||||
* header value is prepended to the message. <tt>lengthAdjustment</tt> is zero
|
* header value is prepended to the message. <tt>lengthAdjustment</tt> is zero
|
||||||
* again because the decoder always counts the length of the prepended data into
|
* again because the decoder always takes the length of the prepended data into
|
||||||
* frame length calculation.
|
* account during frame length calculation.
|
||||||
* <pre>
|
* <pre>
|
||||||
* <b>lengthFieldOffset</b> = <b>2</b> (= the length of Header 1)
|
* <b>lengthFieldOffset</b> = <b>2</b> (= the length of Header 1)
|
||||||
* <b>lengthFieldLength</b> = <b>3</b>
|
* <b>lengthFieldLength</b> = <b>3</b>
|
||||||
@ -113,8 +114,8 @@ import org.jboss.netty.channel.ChannelHandlerContext;
|
|||||||
*
|
*
|
||||||
* <h3>3 bytes length field at the beginning of 5 bytes header, do not strip header</h3>
|
* <h3>3 bytes length field at the beginning of 5 bytes header, do not strip header</h3>
|
||||||
*
|
*
|
||||||
* This is an advanced example that shows a case where there is an extra header
|
* This is an advanced example that shows the case where there is an extra
|
||||||
* between the length field and the message body. You have to specify a
|
* header between the length field and the message body. You have to specify a
|
||||||
* positive <tt>lengthAdjustment</tt> so that the decoder counts the extra
|
* positive <tt>lengthAdjustment</tt> so that the decoder counts the extra
|
||||||
* header into the frame length calculation.
|
* header into the frame length calculation.
|
||||||
* <pre>
|
* <pre>
|
||||||
|
Loading…
Reference in New Issue
Block a user