Class StringDecoder

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.charset.Charset charset  
    • Constructor Summary

      Constructors 
      Constructor Description
      StringDecoder()
      Creates a new instance with the current system character set.
      StringDecoder​(java.nio.charset.Charset charset)
      Creates a new instance with the specified character set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object decode​(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg)
      Transforms the specified received message into another message and return the transformed message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • charset

        private final java.nio.charset.Charset charset
    • Constructor Detail

      • StringDecoder

        public StringDecoder()
        Creates a new instance with the current system character set.
      • StringDecoder

        public StringDecoder​(java.nio.charset.Charset charset)
        Creates a new instance with the specified character set.
    • Method Detail

      • decode

        protected java.lang.Object decode​(ChannelHandlerContext ctx,
                                          Channel channel,
                                          java.lang.Object msg)
                                   throws java.lang.Exception
        Description copied from class: OneToOneDecoder
        Transforms the specified received message into another message and return the transformed message. Return null if the received message is supposed to be discarded.
        Specified by:
        decode in class OneToOneDecoder
        Throws:
        java.lang.Exception