I'm currently working with Netty 3.5.10.Final to implement a client for a server that uses a binary protocol with a mixed byte order. That is to say, there are many situations in the protocol where I will have to read/write one set of bytes in big-endian order, then another set in little-endian order, and then again switch back to big-endian.
I've discovered that there is not (as far as I know) an easy way to deal with this situation, especially with ChannelBuffers.wrappedBuffer(ChannelBuffer buf) throwing an IllegalArgumentException when the endianness differs. I am learning both about Netty and this protocol as I go, so I was not aware I would run into this issue when I began.
How have others have dealt with this issue, especially within the confines of the Netty 3.x framework? I'd love to hear about all solutions though.