Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ajax4jsf.webapp
Class FilterServletResponseWrapper

    java.lang.Object
      javax.servlet.ServletResponseWrapper
          javax.servlet.http.HttpServletResponseWrapper
              org.ajax4jsf.webapp.FilterServletResponseWrapper

All Implemented Interfaces:
  javax.servlet.http.HttpServletResponse, javax.servlet.ServletResponse

    public class FilterServletResponseWrapper

extends javax.servlet.http.HttpServletResponseWrapper

Base wrapper save JSF page response, for parse to XML with different parsers

Version:
  $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:17 $
Author:
  shura (latest modification by $Author: alexsmirnov $)

Nested Class Summary
`class` | `FilterServletResponseWrapper.ByteArrayServletOutputStream`
`static class` | `FilterServletResponseWrapper.NullServletOutputStream`
`class` | `FilterServletResponseWrapper.ServletStringWriter`

Field Summary
`protected FastBufferOutputStream` | `byteStream`
`static java.lang.String` | `DEFAULT_ENCODING`

Fields inherited from interface javax.servlet.http.HttpServletResponse
`SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY`

Constructor Summary
`FilterServletResponseWrapper(javax.servlet.http.HttpServletResponse response)`

Method Summary
`void` | `addCookie(javax.servlet.http.Cookie cookie)`
`void` | `addHeader(java.lang.String name, java.lang.String value)`
`void` | `flushBuffer()`
`int` | `getBufferSize()`
`java.lang.String` | `getCharacterEncoding()`
`org.xml.sax.InputSource` | `getContentAsInputSource()`
`java.io.Reader` | `getContentAsReader()` Convert saved context to stream for parsing
`java.io.InputStream` | `getContentAsStream()` Convert saved context to stream for parsing
`int` | `getContentLength()`
`java.lang.String` | `getContentType()`
`static java.lang.String` | `getContentTypeCharset(java.lang.String contentType)` Return a charset from a content-type.
`java.util.Collection<javax.servlet.http.Cookie>` | `getCookies()`
`java.util.Map<java.lang.String,java.lang.Object>` | `getHeaders()`
`javax.servlet.ServletOutputStream` | `getOutputStream()`
`java.lang.String` | `getRedirectLocation()`
`java.io.PrintWriter` | `getWriter()`
`boolean` | `isError()`
`boolean` | `isUseNullStream()`
`boolean` | `isUseStream()`
`boolean` | `isUseWriter()`
`void` | `parseContent(java.io.Writer out, HtmlParser parser)` Parse saved content to output stream ( and store as Dom Document tree )
`void` | `reset()`
`void` | `resetBuffer()`
`void` | `sendContent(javax.servlet.ServletOutputStream outputStream)` Send buffered content directly to output stream.
`void` | `sendContent(java.io.Writer output)` Send buffered content directly to output stream.
`void` | `sendError(int sc)`
`void` | `sendError(int sc, java.lang.String msg)`
`void` | `sendRedirect(java.lang.String arg0)`
`void` | `setBufferSize(int arg0)`
`void` | `setCharacterEncoding(java.lang.String charset)`
`void` | `setContentLength(int contentLength)`
`void` | `setContentType(java.lang.String type)`
`void` | `setHeader(java.lang.String name, java.lang.String value)`
`void` | `setLocale(java.util.Locale loc)`
`void` | `setUseNullStream(boolean useNullStream)`

Methods inherited from class javax.servlet.http.HttpServletResponseWrapper
`addDateHeader, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, setDateHeader, setIntHeader, setStatus, setStatus`

Methods inherited from class javax.servlet.ServletResponseWrapper
`getLocale, getResponse, isCommitted, setResponse`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.servlet.ServletResponse
`getLocale, isCommitted`

Field Detail

### DEFAULT_ENCODING

    public static final java.lang.String DEFAULT_ENCODING

See Also:
  Constant Field Values

### byteStream

    protected FastBufferOutputStream byteStream

Constructor Detail

### FilterServletResponseWrapper

    public FilterServletResponseWrapper(javax.servlet.http.HttpServletResponse response)

Method Detail

### getContentAsStream

    public java.io.InputStream getContentAsStream()

  Convert saved context to stream for parsing

  Returns:
    stream from saved content

### getContentAsReader

    public java.io.Reader getContentAsReader()

  Convert saved context to stream for parsing

  Returns:
    stream from saved content

### getWriter

    public java.io.PrintWriter getWriter()
                                  throws java.io.IOException

  Specified by:
    `getWriter` in interface `javax.servlet.ServletResponse`
  Overrides:
    `getWriter` in class `javax.servlet.ServletResponseWrapper`
  Throws:
    `java.io.IOException`

### getOutputStream

    public javax.servlet.ServletOutputStream getOutputStream()
                                                      throws java.io.IOException

  Specified by:
    `getOutputStream` in interface `javax.servlet.ServletResponse`
  Overrides:
    `getOutputStream` in class `javax.servlet.ServletResponseWrapper`
  Throws:
    `java.io.IOException`

### getContentTypeCharset

    public static java.lang.String getContentTypeCharset(java.lang.String contentType)

  Return a charset from a content-type.

### addHeader

    public void addHeader(java.lang.String name,
                          java.lang.String value)

  Specified by:
    `addHeader` in interface `javax.servlet.http.HttpServletResponse`
  Overrides:
    `addHeader` in class `javax.servlet.http.HttpServletResponseWrapper`

### setHeader

    public void setHeader(java.lang.String name,
                          java.lang.String value)

  Specified by:
    `setHeader` in interface `javax.servlet.http.HttpServletResponse`
  Overrides:
    `setHeader` in class `javax.servlet.http.HttpServletResponseWrapper`

### getHeaders

    public java.util.Map<java.lang.String,java.lang.Object> getHeaders()

### getCharacterEncoding

    public java.lang.String getCharacterEncoding()

  Specified by:
    `getCharacterEncoding` in interface `javax.servlet.ServletResponse`
  Overrides:
    `getCharacterEncoding` in class `javax.servlet.ServletResponseWrapper`

### setCharacterEncoding

    public void setCharacterEncoding(java.lang.String charset)

  Specified by:
    `setCharacterEncoding` in interface `javax.servlet.ServletResponse`
  Overrides:
    `setCharacterEncoding` in class `javax.servlet.ServletResponseWrapper`

### setContentType

    public void setContentType(java.lang.String type)

  Specified by:
    `setContentType` in interface `javax.servlet.ServletResponse`
  Overrides:
    `setContentType` in class `javax.servlet.ServletResponseWrapper`

### setLocale

    public void setLocale(java.util.Locale loc)

  Specified by:
    `setLocale` in interface `javax.servlet.ServletResponse`
  Overrides:
    `setLocale` in class `javax.servlet.ServletResponseWrapper`

### getContentType

    public java.lang.String getContentType()

  Specified by:
    `getContentType` in interface `javax.servlet.ServletResponse`
  Overrides:
    `getContentType` in class `javax.servlet.ServletResponseWrapper`

### sendContent

    public void sendContent(javax.servlet.ServletOutputStream outputStream)
                     throws java.io.IOException

  Send buffered content directly to output stream.

  Parameters:
    `outputStream` -
  Throws:
    `java.io.IOException`

### sendContent

    public void sendContent(java.io.Writer output)
                     throws java.io.IOException

  Send buffered content directly to output stream.

  Parameters:
    `outputStream` -
  Throws:
    `java.io.IOException`

### isUseStream

    public boolean isUseStream()

  Returns:
    Returns the useStream.

### isUseWriter

    public boolean isUseWriter()

  Returns:
    Returns the useWriter.

### getContentAsInputSource

    public org.xml.sax.InputSource getContentAsInputSource()

  Returns:

### flushBuffer

    public void flushBuffer()
                     throws java.io.IOException

  Specified by:
    `flushBuffer` in interface `javax.servlet.ServletResponse`
  Overrides:
    `flushBuffer` in class `javax.servlet.ServletResponseWrapper`
  Throws:
    `java.io.IOException`

### getBufferSize

    public int getBufferSize()

  Specified by:
    `getBufferSize` in interface `javax.servlet.ServletResponse`
  Overrides:
    `getBufferSize` in class `javax.servlet.ServletResponseWrapper`

### resetBuffer

    public void resetBuffer()

  Specified by:
    `resetBuffer` in interface `javax.servlet.ServletResponse`
  Overrides:
    `resetBuffer` in class `javax.servlet.ServletResponseWrapper`

### setBufferSize

    public void setBufferSize(int arg0)

  Specified by:
    `setBufferSize` in interface `javax.servlet.ServletResponse`
  Overrides:
    `setBufferSize` in class `javax.servlet.ServletResponseWrapper`

### reset

    public void reset()

  Specified by:
    `reset` in interface `javax.servlet.ServletResponse`
  Overrides:
    `reset` in class `javax.servlet.ServletResponseWrapper`

### getContentLength

    public int getContentLength()

  Returns:
    Returns the contentLength.

### setContentLength

    public void setContentLength(int contentLength)

  Specified by:
    `setContentLength` in interface `javax.servlet.ServletResponse`
  Overrides:
    `setContentLength` in class `javax.servlet.ServletResponseWrapper`
  Parameters:
    `contentLength` - The contentLength to set.

### parseContent

    public void parseContent(java.io.Writer out,
                             HtmlParser parser)
                      throws java.io.IOException

  Parse saved content to output stream ( and store as Dom Document tree )

  Parameters:
    `out` - stream to send parsed content, if null - only build dom tree.
  Throws:
    `java.io.IOException`

### sendRedirect

    public void sendRedirect(java.lang.String arg0)
                      throws java.io.IOException

  Specified by:
    `sendRedirect` in interface `javax.servlet.http.HttpServletResponse`
  Overrides:
    `sendRedirect` in class `javax.servlet.http.HttpServletResponseWrapper`
  Throws:
    `java.io.IOException`

### getRedirectLocation

    public java.lang.String getRedirectLocation()

### isUseNullStream

    public boolean isUseNullStream()

  Returns:
    the useNullStream

### setUseNullStream

    public void setUseNullStream(boolean useNullStream)

  Parameters:
    `useNullStream` - the useNullStream to set

### getCookies

    public java.util.Collection<javax.servlet.http.Cookie> getCookies()

### addCookie

    public void addCookie(javax.servlet.http.Cookie cookie)

  Specified by:
    `addCookie` in interface `javax.servlet.http.HttpServletResponse`
  Overrides:
    `addCookie` in class `javax.servlet.http.HttpServletResponseWrapper`

### sendError

    public void sendError(int sc)
                   throws java.io.IOException

  Specified by:
    `sendError` in interface `javax.servlet.http.HttpServletResponse`
  Overrides:
    `sendError` in class `javax.servlet.http.HttpServletResponseWrapper`
  Throws:
    `java.io.IOException`

### sendError

    public void sendError(int sc,
                          java.lang.String msg)
                   throws java.io.IOException

  Specified by:
    `sendError` in interface `javax.servlet.http.HttpServletResponse`
  Overrides:
    `sendError` in class `javax.servlet.http.HttpServletResponseWrapper`
  Throws:
    `java.io.IOException`

### isError

    public boolean isError()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.