本文整理了Java中org.apache.coyote.Response.getContentLengthLong
方法的一些代码示例,展示了Response.getContentLengthLong
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getContentLengthLong
方法的具体详情如下:
包路径:org.apache.coyote.Response
类名称:Response
方法名:getContentLengthLong
暂无
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Some filters need additional parameters from the response. All the
* necessary reading can occur in that method, as this method is called
* after the response header processing is complete.
*/
@Override
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Some filters need additional parameters from the response. All the
* necessary reading can occur in that method, as this method is called
* after the response header processing is complete.
*/
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Some filters need additional parameters from the response. All the
* necessary reading can occur in that method, as this method is called
* after the response header processing is complete.
*/
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Some filters need additional parameters from the response. All the
* necessary reading can occur in that method, as this method is called
* after the response header processing is complete.
*/
@Override
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: codefollower/Tomcat-Research
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Some filters need additional parameters from the response. All the
* necessary reading can occur in that method, as this method is called
* after the response header processing is complete.
*/
@Override
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
/**
* Some filters need additional parameters from the response. All the
* necessary reading can occur in that method, as this method is called
* after the response header processing is complete.
*/
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
/**
* Some filters need additional parameters from the response. All the
* necessary reading can occur in that method, as this method is called
* after the response header processing is complete.
*/
@Override
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: org.jboss.web/jbossweb
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: jboss.web/jbossweb
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public void setResponse(Response response) {
contentLength = response.getContentLengthLong();
remaining = contentLength;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public int getContentLength() {
long length = getContentLengthLong();
if (length < Integer.MAX_VALUE) {
return (int) length;
}
return -1;
}
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ public boolean containsHeader(String name)
/* */ {
/* 1056 */ char cc = name.charAt(0);
/* 1057 */ if ((cc == 'C') || (cc == 'c')) {
/* 1058 */ if (name.equalsIgnoreCase("Content-Type"))
/* */ {
/* 1060 */ return this.coyoteResponse.getContentType() != null;
/* */ }
/* 1062 */ if (name.equalsIgnoreCase("Content-Length"))
/* */ {
/* 1064 */ return this.coyoteResponse.getContentLengthLong() != -1L;
/* */ }
/* */ }
/* */
/* 1068 */ return this.coyoteResponse.containsHeader(name);
/* */ }
/* */
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Has the specified header been set already in this response?
*
* @param name Name of the header to check
*/
public boolean containsHeader(String name) {
// Need special handling for Content-Type and Content-Length due to
// special handling of these in coyoteResponse
char cc=name.charAt(0);
if(cc=='C' || cc=='c') {
if(name.equalsIgnoreCase("Content-Type")) {
// Will return null if this has not been set
return (coyoteResponse.getContentType() != null);
}
if(name.equalsIgnoreCase("Content-Length")) {
// -1 means not known and is not sent to client
return (coyoteResponse.getContentLengthLong() != -1);
}
}
return coyoteResponse.containsHeader(name);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Has the specified header been set already in this response?
*
* @param name Name of the header to check
* @return <code>true</code> if the header has been set
*/
@Override
public boolean containsHeader(String name) {
// Need special handling for Content-Type and Content-Length due to
// special handling of these in coyoteResponse
char cc=name.charAt(0);
if(cc=='C' || cc=='c') {
if(name.equalsIgnoreCase("Content-Type")) {
// Will return null if this has not been set
return (getCoyoteResponse().getContentType() != null);
}
if(name.equalsIgnoreCase("Content-Length")) {
// -1 means not known and is not sent to client
return (getCoyoteResponse().getContentLengthLong() != -1);
}
}
return getCoyoteResponse().containsHeader(name);
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* When committing the response, we have to validate the set of headers, as
* well as setup the response filters.
*/
protected void sendSynReply() {
response.setCommitted(true);
// Special headers
MimeHeaders headers = response.getMimeHeaders();
String contentType = response.getContentType();
if (contentType != null) {
headers.setValue("Content-Type").setString(contentType);
}
String contentLanguage = response.getContentLanguage();
if (contentLanguage != null) {
headers.setValue("Content-Language").setString(contentLanguage);
}
long contentLength = response.getContentLengthLong();
if (contentLength >= 0) {
headers.setValue("Content-Length").setLong(contentLength);
}
sendResponseHead();
}
内容来源于网络,如有侵权,请联系作者删除!