Web Hosting Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting

Alden Hosting provides professional, efficient, and reliable business-class Web hosting services to small- and medium-sized businesses.

WWW.

Call Us Toll-Free
(877) 256-0328

Outside USA
1 - (201) 505-0430

Web Hosting Welcome Web Hosting Web Hosting Plans Overview , Fund Raising, Fundraising, web hosting, website hosting, web site hosting Web Hosting Fund Raising, Fundraising, web hosting Web Hosting Resellers, web Hosting Web Hosting Web Design, web Hosting Web Hosting Extra Services,  web Hosting Web Hosting Traffic Booster, web hosting Web Hosting Traffic Booster, web hosting Web Hosting Technical Support,  web Hosting Web Hosting webmaster tips,  web Hosting Web Hosting 30 Day Money Back, web hosting Web Hosting Legal Notices for Web Hosting Web Hosting Glossary Computer Terms for web Hosting Web Hosting Contact Information - web hosting

Site Map

  Web Hosting Web Hosting Sign-Up   Web Hosting Fund Raising, Fundraising, web hosting, website hosting, web site hosting    Web Hosting Resellers web hosting, website hosting, web site hosting   Web Hosting EZ Site Control Panel for web hosting,website hosting, web site hosting
ServletResponseWrapper (Servlet API Documentation)

javax.servlet
Class ServletResponseWrapper

java.lang.Object
  extended byjavax.servlet.ServletResponseWrapper
All Implemented Interfaces:
ServletResponse
Direct Known Subclasses:
HttpServletResponseWrapper

public class ServletResponseWrapper
extends java.lang.Object
implements ServletResponse

Provides a convenient implementation of the ServletResponse interface that can be subclassed by developers wishing to adapt the response from a Servlet. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped response object.

Since:
v 2.3
Version:
$Version$
Author:
Various
See Also:
ServletResponse

Constructor Summary
ServletResponseWrapper(ServletResponse response)
          Creates a ServletResponse adaptor wrapping the given response object.
 
Method Summary
 void flushBuffer()
          The default behavior of this method is to call flushBuffer() on the wrapped response object.
 int getBufferSize()
          The default behavior of this method is to return getBufferSize() on the wrapped response object.
 java.lang.String getCharacterEncoding()
          The default behavior of this method is to return getCharacterEncoding() on the wrapped response object.
 java.lang.String getContentType()
          The default behavior of this method is to return getContentType() on the wrapped response object.
 java.util.Locale getLocale()
          The default behavior of this method is to return getLocale() on the wrapped response object.
 ServletOutputStream getOutputStream()
          The default behavior of this method is to return getOutputStream() on the wrapped response object.
 ServletResponse getResponse()
          Return the wrapped ServletResponse object.
 java.io.PrintWriter getWriter()
          The default behavior of this method is to return getWriter() on the wrapped response object.
 boolean isCommitted()
          The default behavior of this method is to return isCommitted() on the wrapped response object.
 void reset()
          The default behavior of this method is to call reset() on the wrapped response object.
 void resetBuffer()
          The default behavior of this method is to call resetBuffer() on the wrapped response object.
 void setBufferSize(int size)
          The default behavior of this method is to call setBufferSize(int size) on the wrapped response object.
 void setCharacterEncoding(java.lang.String charset)
          The default behavior of this method is to call setCharacterEncoding(String charset) on the wrapped response object.
 void setContentLength(int len)
          The default behavior of this method is to call setContentLength(int len) on the wrapped response object.
 void setContentType(java.lang.String type)
          The default behavior of this method is to call setContentType(String type) on the wrapped response object.
 void setLocale(java.util.Locale loc)
          The default behavior of this method is to call setLocale(Locale loc) on the wrapped response object.
 void setResponse(ServletResponse response)
          Sets the response being wrapped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletResponseWrapper

public ServletResponseWrapper(ServletResponse response)
Creates a ServletResponse adaptor wrapping the given response object.

Throws:
java.lang.IllegalArgumentException - if the response is null.
Method Detail

getResponse

public ServletResponse getResponse()
Return the wrapped ServletResponse object.


setResponse

public void setResponse(ServletResponse response)
Sets the response being wrapped.

Throws:
java.lang.IllegalArgumentException - if the response is null.

setCharacterEncoding

public void setCharacterEncoding(java.lang.String charset)
The default behavior of this method is to call setCharacterEncoding(String charset) on the wrapped response object.

Specified by:
setCharacterEncoding in interface ServletResponse
Parameters:
charset - a String specifying only the character set defined by IANA Character Sets (http://www.iana.org/assignments/character-sets)
Since:
2.4
See Also:
#setLocale

getCharacterEncoding

public java.lang.String getCharacterEncoding()
The default behavior of this method is to return getCharacterEncoding() on the wrapped response object.

Specified by:
getCharacterEncoding in interface ServletResponse
Returns:
a String specifying the name of the character encoding, for example, UTF-8

getOutputStream

public ServletOutputStream getOutputStream()
                                    throws java.io.IOException
The default behavior of this method is to return getOutputStream() on the wrapped response object.

Specified by:
getOutputStream in interface ServletResponse
Returns:
a ServletOutputStream for writing binary data
Throws:
java.io.IOException - if an input or output exception occurred
See Also:
ServletResponse.getWriter()

getWriter

public java.io.PrintWriter getWriter()
                              throws java.io.IOException
The default behavior of this method is to return getWriter() on the wrapped response object.

Specified by:
getWriter in interface ServletResponse
Returns:
a PrintWriter object that can return character data to the client
Throws:
java.io.IOException - if an input or output exception occurred
See Also:
ServletResponse.getOutputStream(), ServletResponse.setCharacterEncoding(java.lang.String)

setContentLength

public void setContentLength(int len)
The default behavior of this method is to call setContentLength(int len) on the wrapped response object.

Specified by:
setContentLength in interface ServletResponse
Parameters:
len - an integer specifying the length of the content being returned to the client; sets the Content-Length header

setContentType

public void setContentType(java.lang.String type)
The default behavior of this method is to call setContentType(String type) on the wrapped response object.

Specified by:
setContentType in interface ServletResponse
Parameters:
type - a String specifying the MIME type of the content
See Also:
ServletResponse.setLocale(java.util.Locale), ServletResponse.setCharacterEncoding(java.lang.String), ServletResponse.getOutputStream(), ServletResponse.getWriter()

getContentType

public java.lang.String getContentType()
The default behavior of this method is to return getContentType() on the wrapped response object.

Specified by:
getContentType in interface ServletResponse
Returns:
a String specifying the content type, for example, text/html; charset=UTF-8, or null
Since:
2.4

setBufferSize

public void setBufferSize(int size)
The default behavior of this method is to call setBufferSize(int size) on the wrapped response object.

Specified by:
setBufferSize in interface ServletResponse
Parameters:
size - the preferred buffer size
See Also:
ServletResponse.getBufferSize(), ServletResponse.flushBuffer(), ServletResponse.isCommitted(), ServletResponse.reset()

getBufferSize

public int getBufferSize()
The default behavior of this method is to return getBufferSize() on the wrapped response object.

Specified by:
getBufferSize in interface ServletResponse
Returns:
the actual buffer size used
See Also:
ServletResponse.setBufferSize(int), ServletResponse.flushBuffer(), ServletResponse.isCommitted(), ServletResponse.reset()

flushBuffer

public void flushBuffer()
                 throws java.io.IOException
The default behavior of this method is to call flushBuffer() on the wrapped response object.

Specified by:
flushBuffer in interface ServletResponse
Throws:
java.io.IOException
See Also:
ServletResponse.setBufferSize(int), ServletResponse.getBufferSize(), ServletResponse.isCommitted(), ServletResponse.reset()

isCommitted

public boolean isCommitted()
The default behavior of this method is to return isCommitted() on the wrapped response object.

Specified by:
isCommitted in interface ServletResponse
Returns:
a boolean indicating if the response has been committed
See Also:
ServletResponse.setBufferSize(int), ServletResponse.getBufferSize(), ServletResponse.flushBuffer(), ServletResponse.reset()

reset

public void reset()
The default behavior of this method is to call reset() on the wrapped response object.

Specified by:
reset in interface ServletResponse
See Also:
ServletResponse.setBufferSize(int), ServletResponse.getBufferSize(), ServletResponse.flushBuffer(), ServletResponse.isCommitted()

resetBuffer

public void resetBuffer()
The default behavior of this method is to call resetBuffer() on the wrapped response object.

Specified by:
resetBuffer in interface ServletResponse
See Also:
ServletResponse.setBufferSize(int), ServletResponse.getBufferSize(), ServletResponse.isCommitted(), ServletResponse.reset()

setLocale

public void setLocale(java.util.Locale loc)
The default behavior of this method is to call setLocale(Locale loc) on the wrapped response object.

Specified by:
setLocale in interface ServletResponse
Parameters:
loc - the locale of the response
See Also:
ServletResponse.getLocale(), ServletResponse.setContentType(java.lang.String), ServletResponse.setCharacterEncoding(java.lang.String)

getLocale

public java.util.Locale getLocale()
The default behavior of this method is to return getLocale() on the wrapped response object.

Specified by:
getLocale in interface ServletResponse
See Also:
ServletResponse.setLocale(java.util.Locale)


Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.
Web Hosting, web hosting, JSP, Servlets, Tomcat, website hosting, web site hosting
Add to My Yahoo!

XML icon

Add to Google

 

 

 

 

 

 

 

 

 

 

 

http://alden-servlet-Hosting.com
JSP at alden-servlet-Hosting.com
Servlets at alden-servlet-Hosting.com
Servlet at alden-servlet-Hosting.com
Tomcat at alden-servlet-Hosting.com
MySQL at alden-servlet-Hosting.com
Java at alden-servlet-Hosting.com
sFTP at alden-servlet-Hosting.com
http://alden-tomcat-Hosting.com
JSP at alden-tomcat-Hosting.com
Servlets at alden-tomcat-Hosting.com
Servlet at alden-tomcat-Hosting.com
Tomcat at alden-tomcat-Hosting.com
MySQL at alden-tomcat-Hosting.com
Java at alden-tomcat-Hosting.com
sFTP at alden-tomcat-Hosting.com
http://alden-sftp-Hosting.com
JSP at alden-sftp-Hosting.com
Servlets at alden-sftp-Hosting.com
Servlet at alden-sftp-Hosting.com
Tomcat at alden-sftp-Hosting.com
MySQL at alden-sftp-Hosting.com
Java at alden-sftp-Hosting.com
sFTP at alden-sftp-Hosting.com
http://alden-jsp-Hosting.com
JSP at alden-jsp-Hosting.com
Servlets at alden-jsp-Hosting.com
Servlet at alden-jsp-Hosting.com
Tomcat at alden-jsp-Hosting.com
MySQL at alden-jsp-Hosting.com
Java at alden-jsp-Hosting.com
sFTP at alden-jsp-Hosting.com
http://alden-java-Hosting.com
JSp at alden-java-Hosting.com
Servlets at alden-java-Hosting.com
Servlet at alden-java-Hosting.com
Tomcat at alden-java-Hosting.com
MySQL at alden-java-Hosting.com
Java at alden-java-Hosting.com
sFTP at alden-java-Hosting.com
JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP Servlets Tomcat mysql Java JSP at JSP.aldenWEBhosting.com Servlets at servlets.aldenWEBhosting.com Tomcat at Tomcat.aldenWEBhosting.com mysql at mysql.aldenWEBhosting.com Java at Java.aldenWEBhosting.com Web Hosts Portal Web Links Web Links Web Hosting JSP Solutions Web Links JSP Solutions Web Hosting Servlets Solutions Web Links Servlets Solutions Web Hosting Web Links Web Links . .
.
.
. .
. . . . jsp hosting servlets hosting web hosting web sites designed cheap web hosting web site hosting myspace web hosting