org.apache.catalina.connector.Response.getContentCount()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(128)

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

Response.getContentCount介绍

[英]Return the number of bytes actually written to the output stream.
[中]返回实际写入输出流的字节数。

代码示例

代码示例来源:origin: org.glassfish.main.web/web-core

int getResponseContentCount() {
  validateResponse();
  return response.getContentCount();
}
// END SJSAS 6374990

代码示例来源:origin: org.picketlink/picketlink-tomcat-common

/**
 * <p> Before forwarding we need to know the content length of the target resource in order to configure the response properly.
 * This is necessary because the valve already have written to the response, and we want to override with the target resource
 * data. </p>
 *
 * @param request
 * @param response
 * @param dispatch
 *
 * @throws ServletException
 * @throws IOException
 */
private void includeResource(ServletRequest request, Response response, RequestDispatcher dispatch)
  throws ServletException, IOException {
  dispatch.include(request, response);
  // we need to re-configure the content length because Tomcat will truncate the output with the size of the welcome page
  // (eg.: index.html).
  response.getCoyoteResponse().setContentLength(response.getContentCount());
}

代码示例来源:origin: org.picketlink.distribution/picketlink-jbas5

/**
 * <p> Before forwarding we need to know the content length of the target resource in order to configure the response properly.
 * This is necessary because the valve already have written to the response, and we want to override with the target resource
 * data. </p>
 *
 * @param request
 * @param response
 * @param dispatch
 *
 * @throws ServletException
 * @throws IOException
 */
private void includeResource(ServletRequest request, Response response, RequestDispatcher dispatch)
  throws ServletException, IOException {
  dispatch.include(request, response);
  // we need to re-configure the content length because Tomcat will truncate the output with the size of the welcome page
  // (eg.: index.html).
  response.getCoyoteResponse().setContentLength(response.getContentCount());
}

代码示例来源:origin: org.picketlink.distribution/picketlink-jbas7

/**
 * <p> Before forwarding we need to know the content length of the target resource in order to configure the response properly.
 * This is necessary because the valve already have written to the response, and we want to override with the target resource
 * data. </p>
 *
 * @param request
 * @param response
 * @param dispatch
 *
 * @throws ServletException
 * @throws IOException
 */
private void includeResource(ServletRequest request, Response response, RequestDispatcher dispatch)
  throws ServletException, IOException {
  dispatch.include(request, response);
  // we need to re-configure the content length because Tomcat will truncate the output with the size of the welcome page
  // (eg.: index.html).
  response.getCoyoteResponse().setContentLength(response.getContentCount());
}

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

/**
 * Application commit flag accessor.
 */
public boolean isAppCommitted() {
  return (this.appCommitted || isCommitted() || isSuspended()
      || ((getContentLength() > 0) 
        && (getContentCount() >= getContentLength())));
}

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

/**
 * Application commit flag accessor.
 */
public boolean isAppCommitted() {
  return (this.appCommitted || isCommitted() || isSuspended()
      || ((getContentLength() > 0) 
        && (getContentCount() >= getContentLength())));
}

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

result.append(timeFormatter.format(date));
else if (FieldInfo.SPECIAL_BYTES==fieldInfos[i].location) {
  int length = response.getContentCount();
  if (length > 0)
    result.append(length);

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

/**
 * Application commit flag accessor.
 */
public boolean isAppCommitted() {
  return (this.appCommitted || isCommitted() || isSuspended()
      || ((getContentLength() > 0) 
        && (getContentCount() >= getContentLength())));
}

代码示例来源:origin: org.glassfish.main.web/web-core

/**
 * Application commit flag accessor.
 */
public boolean isAppCommitted() {
  return this.appCommitted || isCommitted() || isSuspended()
      || getContentLength() > 0
        && getContentCount() >= getContentLength();
}

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

/*      */   public boolean isAppCommitted()
/*      */   {
/*  324 */     return (this.appCommitted) || (isCommitted()) || (isSuspended()) || ((getContentLength() > 0) && (getContentCount() >= getContentLength()));
/*      */   }
/*      */

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

int length = response.getContentCount();

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

int length = response.getContentCount();

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

if ((statusCode < 400) || (response.getContentCount() > 0))
  return;

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

if ((statusCode < 400) || (response.getContentCount() > 0))
  return;

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

int length = response.getContentCount();
if (length <= 0)
  value = "-";

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

if(request != null)
  query = request.getRequestURI();
int bytes = response.getContentCount();
if(bytes < 0)
  bytes = 0;

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

if ((statusCode < 400) || (response.getContentCount() > 0))
  return;

相关文章

Response类方法