title: Apache camel netty custom encoder and decoder sample
body: <p>Apache camel netty tcp component doc(<a href="http://camel.apache.org/netty.html" rel="nofollow">http://camel.apache.org/netty.html</a>) says,</p>
  
  <p>encoder</p>
  
  <pre><code>A custom ChannelHandler class that can be used to perform special marshalling of outbound payloads. Must override org.jboss.netty.channel.ChannelDownStreamHandler.
  </code></pre>
  
  <p>decoder</p>
  
  <pre><code>A custom ChannelHandler class that can be used to perform special marshalling of inbound payloads. Must override org.jboss.netty.channel.ChannelUpStreamHandler.
  </code></pre>
  
  <p>Could you please point me an example on how/what to do in overriding class. I want a custom tcp encoder/decoder to read/write bytes.</p>