org.apache.coyote.Response.finish()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(154)

本文整理了Java中org.apache.coyote.Response.finish方法的一些代码示例,展示了Response.finish的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.finish方法的具体详情如下:
包路径:org.apache.coyote.Response
类名称:Response
方法名:finish

Response.finish介绍

暂无

代码示例

代码示例来源:origin: codefollower/Tomcat-Research

private void finish() {
  if (!response.isCommitted()) {
    response.action(ActionCode.COMMIT, response);
  }
  if (finished)
    return;
  finished = true;
  response.finish();
}

代码示例来源:origin: org.glassfish.metro/webservices-extra

res.finish();

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

/**
 * Close the output buffer. This tries to calculate the response size if 
 * the response has not been committed yet.
 * 
 * @throws IOException An underlying IOException occurred
 */
@Override
public void close()
  throws IOException {
  if (closed)
    return;
  if (suspended)
    return;
  if ((!coyoteResponse.isCommitted()) 
    && (coyoteResponse.getContentLengthLong() == -1)) {
    // If this didn't cause a commit of the response, the final content
    // length can be calculated
    if (!coyoteResponse.isCommitted()) {
      coyoteResponse.setContentLength(bb.getLength());
    }
  }
  doFlush(false);
  closed = true;
  coyoteResponse.finish();
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * Close the output buffer. This tries to calculate the response size if 
 * the response has not been committed yet.
 * 
 * @throws IOException An underlying IOException occurred
 */
@Override
public void close()
  throws IOException {
  if (closed)
    return;
  if (suspended)
    return;
  if ((!coyoteResponse.isCommitted()) 
    && (coyoteResponse.getContentLengthLong() == -1)) {
    // If this didn't cause a commit of the response, the final content
    // length can be calculated
    if (!coyoteResponse.isCommitted()) {
      coyoteResponse.setContentLength(bb.getLength());
    }
  }
  doFlush(false);
  closed = true;
  coyoteResponse.finish();
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * Close the output buffer. This tries to calculate the response size if 
 * the response has not been committed yet.
 * 
 * @throws IOException An underlying IOException occurred
 */
@Override
public void close()
  throws IOException {
  if (closed)
    return;
  if (suspended)
    return;
  if ((!coyoteResponse.isCommitted()) 
    && (coyoteResponse.getContentLengthLong() == -1)) {
    // If this didn't cause a commit of the response, the final content
    // length can be calculated
    if (!coyoteResponse.isCommitted()) {
      coyoteResponse.setContentLength(bb.getLength());
    }
  }
  doFlush(false);
  closed = true;
  coyoteResponse.finish();
}

代码示例来源:origin: jboss.remoting/jboss-remoting

closed = true;
coyoteResponse.finish();

代码示例来源:origin: tomcat/catalina

/**
 * Close the output buffer. This tries to calculate the response size if 
 * the response has not been committed yet.
 * 
 * @throws IOException An underlying IOException occurred
 */
public void close()
  throws IOException {
  if (closed)
    return;
  if (suspended)
    return;
  if ((!coyoteResponse.isCommitted()) 
    && (coyoteResponse.getContentLengthLong() == -1)) {
    // Flushing the char buffer
    if (state == CHAR_STATE) {
      cb.flushBuffer();
      state = BYTE_STATE;
    }
    // If this didn't cause a commit of the response, the final content
    // length can be calculated
    if (!coyoteResponse.isCommitted()) {
      coyoteResponse.setContentLength(bb.getLength());
    }
  }
  doFlush(false);
  closed = true;
  coyoteResponse.finish();
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Close the output buffer. This tries to calculate the response size if 
 * the response has not been committed yet.
 * 
 * @throws IOException An underlying IOException occurred
 */
public void close()
  throws IOException {
  if (closed)
    return;
  if (suspended)
    return;
  // If there are chars, flush all of them to the byte buffer now as bytes are used to
  // calculate the content-length (if everything fits into the byte buffer, of course).
  if (cb.getLength() > 0) {
    cb.flushBuffer();
  }
  if ((!coyoteResponse.isCommitted()) 
    && (coyoteResponse.getContentLengthLong() == -1)) {
    // If this didn't cause a commit of the response, the final content
    // length can be calculated
    if (!coyoteResponse.isCommitted()) {
      coyoteResponse.setContentLength(bb.getLength());
    }
  }
  doFlush(false);
  closed = true;
  coyoteResponse.finish();
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

req.inputBuffer.close();
coyoteResponse.finish();

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

req.inputBuffer.close();
coyoteResponse.finish();

代码示例来源:origin: codefollower/Tomcat-Research

req.inputBuffer.close();
coyoteResponse.finish();

代码示例来源:origin: org.jboss.web/jbossweb

closed = true;
coyoteResponse.finish();

代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource

res.finish();

相关文章