@Override
 void request(AbstractRequestBodyPublisher publisher, long n) {
   if (BackpressureUtils.checkRequest(n, publisher.subscriber)) {
     BackpressureUtils.addAndGet(publisher.demand, n);
     if (publisher.changeState(this, DEMAND)) {
       publisher.checkOnDataAvailable();
     }
   }
 }
 @Override
 void subscribe(
     AbstractRequestBodyPublisher publisher, Subscriber<? super DataBuffer> subscriber) {
   Objects.requireNonNull(subscriber);
   if (publisher.changeState(this, NO_DEMAND)) {
     Subscription subscription = new RequestBodySubscription(publisher);
     publisher.subscriber = subscriber;
     subscriber.onSubscribe(subscription);
   } else {
     throw new IllegalStateException(toString());
   }
 }
 void onError(AbstractRequestBodyPublisher publisher, Throwable t) {
   if (publisher.changeState(this, COMPLETED)) {
     if (publisher.subscriber != null) {
       publisher.subscriber.onError(t);
     }
   }
 }
 void onAllDataRead(AbstractRequestBodyPublisher publisher) {
   if (publisher.changeState(this, COMPLETED)) {
     if (publisher.subscriber != null) {
       publisher.subscriber.onComplete();
     }
   }
 }
 @Override
 void onDataAvailable(AbstractRequestBodyPublisher publisher) {
   if (publisher.changeState(this, READING)) {
     try {
       boolean demandAvailable = publisher.readAndPublish();
       if (demandAvailable) {
         publisher.changeState(READING, DEMAND);
         publisher.checkOnDataAvailable();
       } else {
         publisher.changeState(READING, NO_DEMAND);
       }
     } catch (IOException ex) {
       publisher.onError(ex);
     }
   }
 }
 void cancel(AbstractRequestBodyPublisher publisher) {
   publisher.changeState(this, COMPLETED);
 }