title: Netty:string encoder and decoder converts Hex values into ASCII values. while sending it to the device
body: <p>Netty:I have Hex values coming from communicating device but when i am sending some hex values to that device it got converted into ASCII values.i think i am stuck between wrong encoder and decoder that i am currently using.</p>
  
  <p>can some one tell me how to send these hexadecimal bytes without getting converted
  into any other fromat.</p>
  
  <p>and which is the proper way to implement encoder and decoder for the data which is coming in hex values.</p>
  
  <p>the code i am using in netty is-</p>
  
  <pre><code>private class TCPPipelineFactory implements ChannelPipelineFactory {
          @SuppressWarnings("deprecation")
          @Override
          public ChannelPipeline getPipeline() throws Exception {
              // Create a default pipeline implementation.
              ChannelPipeline pipeline = pipeline();
              //pipeline.addLast("readtimeout", new ReadTimeoutHandler(hashedWheelTimer, idleTimeSecsForIncompleteRequests));
              // Add the text line codec combination first,
              pipeline.addLast("framer", new DelimiterBasedFrameDecoder(8192,
                      new ChannelBuffer[] {
                      ChannelBuffers.wrappedBuffer("$&lt;end&gt;".getBytes()) }));
  //                  ChannelBuffers.wrappedBuffer(new byte[] { '#' }) }));
  
              ///pipeline.addLast("decoder", new StringDecoder()); to check V123 testing
              //pipeline.addLast("encoder", new StringEncoder());
  
              pipeline.addLast("decoder", new ObjectDecoder());
              pipeline.addLast("encoder", new ObjectEncoder());
  
              // and then business logic.
              pipeline.addLast("handler", new TCPService(TCPFrontChannel.this, commLayerId));
  
              return pipeline;
          }
      }
  }
  </code></pre>