code: @Override
      public void close() throws IOException {
          if (isClosed) {
              return;
          }
          flush(sendEor);
          if (sendClose) {
              eventPipeline.fire(new Close(), channel);
          }
          isClosed = true;
      }
docs: Flushes any remaining data with the end of record flag set
  (unless {@link #suppressEndOfRecord()} has been called)
  and fires a {@link Close} event (unless {@link #suppressClose()}
  has been called).