public void reply(List<Header> responseHeaders,boolean out) throws IOException {
  assert (!Thread.holdsLock(FramedStream.this));
  boolean outFinished=false;
synchronized (this) {
    if (responseHeaders == null) {
      throw new NullPointerException("responseHeaders == null");
    }
    if (this.responseHeaders != null) {
      throw new IllegalStateException("reply already sent");
    }
    this.responseHeaders=responseHeaders;
    if (!out) {
      this.sink.finished=true;
      outFinished=true;
    }
  }
  connection.writeSynReply(id,outFinished,responseHeaders);
  if (outFinished) {
    connection.flush();
  }
}

public void reply ( List < Header > responseHeaders , boolean out ) throws IOException { assert ( ! Thread . holdsLock ( FramedStream . this ) ) ; boolean outFinished = false ; synchronized ( this ) { if ( responseHeaders == null ) { throw new NullPointerException ( "responseHeaders == null" ) ; } if ( this . responseHeaders != null ) { throw new IllegalStateException ( "reply already sent" ) ; } this . responseHeaders = responseHeaders ; if ( ! out ) { this . sink . finished = true ; outFinished = true ; } } connection . writeSynReply ( id , outFinished , responseHeaders ) ; if ( outFinished ) { connection . flush ( ) ; } }
sends a reply to an incoming stream .
