javax.servlet
クラス ServletResponseWrapper

java.lang.Object
  |
  +--javax.servlet.ServletResponseWrapper
すべての実装インタフェース:
ServletResponse
直系の既知のサブクラス:
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.

導入されたバージョン:
v 2.3
バージョン:
$Version$
作成者:
Various
関連項目:
ServletResponse

コンストラクタの概要
ServletResponseWrapper(ServletResponse response)
          Creates a ServletResponse adaptor wrapping the given response object.
 
メソッドの概要
 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.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 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.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ServletResponseWrapper

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

例外:
java.lang.IllegalArgumentException - if the response is null.
メソッドの詳細

getResponse

public ServletResponse getResponse()
Return the wrapped ServletResponse object.


setResponse

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

例外:
java.lang.IllegalArgumentException - if the response is null.

getCharacterEncoding

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

定義:
インタフェース ServletResponse 内の getCharacterEncoding
戻り値:
a String specifying the name of the charset, for example, ISO-8859-1

getOutputStream

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

定義:
インタフェース ServletResponse 内の getOutputStream
戻り値:
a ServletOutputStream for writing binary data
例外:
java.io.IOException - if an input or output exception occurred
関連項目:
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.

定義:
インタフェース ServletResponse 内の getWriter
戻り値:
a PrintWriter object that can return character data to the client
例外:
java.io.IOException - if an input or output exception occurred
関連項目:
ServletResponse.getOutputStream(), ServletResponse.setContentType(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.

定義:
インタフェース ServletResponse 内の setContentLength
パラメータ:
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.

定義:
インタフェース ServletResponse 内の setContentType
パラメータ:
type - a String specifying the MIME type of the content
関連項目:
ServletResponse.getOutputStream(), ServletResponse.getWriter()

setBufferSize

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

定義:
インタフェース ServletResponse 内の setBufferSize
パラメータ:
size - the preferred buffer size
関連項目:
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.

定義:
インタフェース ServletResponse 内の getBufferSize
戻り値:
the actual buffer size used
関連項目:
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.

定義:
インタフェース ServletResponse 内の flushBuffer
java.io.IOException
関連項目:
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.

定義:
インタフェース ServletResponse 内の isCommitted
戻り値:
a boolean indicating if the response has been committed
関連項目:
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.

定義:
インタフェース ServletResponse 内の reset
関連項目:
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.

定義:
インタフェース ServletResponse 内の resetBuffer
関連項目:
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.

定義:
インタフェース ServletResponse 内の setLocale
パラメータ:
loc - the locale of the response
関連項目:
ServletResponse.getLocale()

getLocale

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

定義:
インタフェース ServletResponse 内の getLocale
関連項目:
ServletResponse.setLocale(java.util.Locale)


Copyright © 1999-2002 The Apache Software Foundation. All Rights Reserved.