Skip navigation

Netty 4.0.0.Alpha8 released - Going Beta now

After some very busy month we are very happy to announce Netty 4.0.0.Alpha8. This will be the last Alpha release of 4.0.0 and so we move on to the Beta-phase now.

The release comes with a lot of bugfixes and new stuff, we hope you will enjoy it as much as we do. In summary we closed 25 issues this time emoticon_smile


Like said we have a lot of bugfixes in there, here are the most important.

  • [#654] ConcurrentModificationException in NioEventLoop
  • [#739] Potential NullPointerException without checking the variable's status
  • [#743] DefaultChannelPipeline.addLast(..) will erase the ChannelContexts that were added in the DefaultChannelPipeline by DefaultChannelPipeline.addFirst(..)
  • [#747]  WebSocket error when using AIO Transport
  • [#753] Fix exception handling

New stuff

FileRegion aka zero-copy support

We added back support for sending a FileRegion, which allows zero-copy and so can improve performance a lot.  Only the NIO transport can make really use of the improvement, but we "simulate" it in other transports so that you don't need to change your code once you decide to switch the transport implementation.

Just use the sendFile(..) method of Channel or ChannelHandlerContext, like shown below.

You can then intercept the call by either implement ChannelOperationHandler or extend ChannelOperationHandlerAdapter like shown below.

ByteBufAllocator - Get ready for buffer-pooling!

In this release we introduced the foundation for buffer-pooling which will be introduced with Beta1. At the moment all buffers are not-pooled.

Anyway the API is already in.

At the moment we only have an UnpooledByteBufAllocated but this will change. 

You can access the ByteBufAllocator as shown bellow:

This new ByteBufAllocator will make it really easy to use pooled buffers for ChannelInboundHandler and ChannelOutboundHandler in the future. For this we enhanced these two interfaces a bit to have a callback that is notified once the ChannelBuf is safe for de-allocation.

Allow to replace inbound/outbound buffer

With this release we make it even for flexible to write your own ChannelHandler implementation. Thus you now are able to replace the inbound / outbound buffer on the fly. Which may allow you to safe some memory copies are other things.


The "all" jar now contains OSGI meta-data again, so you should be able to use it in your favorite OSGI-Container again.


For a complete list of changes please checkout our issue tracker

The JAR file can be found on Maven Central or  you can also get the full tarball from the download page. Whatever you prefer...

Please let us know if you have any problems or questions.