ChannelBuffer.write*() changes the readable bytes

hezjing hezjing at gmail.com
Wed Apr 1 04:47:16 EDT 2009


Hi
Is it normal that ChannelBuffer.write*() changes the readable bytes?

For example:

ChannelBuffer buffer = dynamicBuffer(512);
// write some bytes here
...
System.out.println("readableBytes: " + buffer.readableBytes());
buffer.writerIndex(2);
System.out.println("readableBytes: " + buffer.readableBytes());

and the program printed:

readableBytes: 27
readableBytes: 2


The readable bytes became 2 after the writerIndex() is called (it was 27).


-- 

Hez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20090401/5cbde2a6/attachment.html 


More information about the netty-users mailing list