code: public DecodingState finishDecode(ProtocolDecoderOutput out)
              throws Exception {
          IoBuffer readData;
          if (buffer == null) {
              readData = IoBuffer.allocate(0);
          } else {
              readData = buffer.flip();
              buffer = null;
          }
          return finishDecode(readData ,out);
      }
docs: {@inheritDoc}