Class LineEncoder

    • Constructor Detail

      • LineEncoder

        public LineEncoder()
        Creates a new instance with the current system line separator and UTF-8 charset encoding.
      • LineEncoder

        public LineEncoder​(LineSeparator lineSeparator)
        Creates a new instance with the specified line separator and UTF-8 charset encoding.
      • LineEncoder

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

        public LineEncoder​(LineSeparator lineSeparator,
                           java.nio.charset.Charset charset)
        Creates a new instance with the specified line separator and character set.
    • Method Detail

      • encode

        protected void encode​(ChannelHandlerContext ctx,
                              java.lang.CharSequence msg,
                              java.util.List<java.lang.Object> out)
                       throws java.lang.Exception
        Description copied from class: MessageToMessageEncoder
        Encode from one message to an other. This method will be called for each written message that can be handled by this encoder.
        Specified by:
        encode in class MessageToMessageEncoder<java.lang.CharSequence>
        Parameters:
        ctx - the ChannelHandlerContext which this MessageToMessageEncoder belongs to
        msg - the message to encode to an other one
        out - the List into which the encoded msg should be added needs to do some kind of aggregation
        Throws:
        java.lang.Exception - is thrown if an error occurs