code: private static void decodeAckEvent(ByteBuf in, List<Object> decodedOut) throws IOException {
          int readerIndex = in.readerIndex();
          int writerIndex = in.writerIndex();
          for (; readerIndex < writerIndex; ++readerIndex) {
              // Read one byte at a time to avoid incrementing reader index
              byte c = in.getByte(readerIndex);
              if (NEW_LINE == c) {
                  ByteBuf json = extractObject(in, in.readerIndex(), readerIndex - in.readerIndex());
                  if (json != null) {
                      decodedOut.add(unmarshall(json));
                  }
  
                  in.readerIndex(readerIndex + 1);
                  in.discardReadBytes();
                  // Reader and writer index shift after discard. Update them
                  readerIndex = in.readerIndex();
                  writerIndex = in.writerIndex();
                  ReferenceCountUtil.release(json);
              }
          }
      }
docs: Decode ByteBuf to AckEvent objects.
  
  @param in         byte buf
  @param decodedOut list of AckEvent objects