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

## com.caucho.server.http
Interface CauchoResponse

All Superinterfaces:
  HttpServletResponse, ServletResponse

All Known Implementing Classes:
  Response, DummyResponse

public interface CauchoResponse
extends HttpServletResponse

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_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_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY`

Method Summary
`void` | `addHeader(java.lang.String key, java.lang.String value)` Adds a response header with the given name and value.
`void` | `clearBuffer()`
`void` | `close()`
`boolean` | `disableHeaders(boolean disable)`
`void` | `flushBuffer()` Forces any content in the buffer to be written to the client.
`int` | `getBufferSize()` Returns the actual buffer size used for the response.
`java.lang.String` | `getChain()`
`boolean` | `getForbidForward()`
`java.lang.String` | `getHeader(java.lang.String key)`
`int` | `getRemaining()`
`WriteStream` | `getStream()`
`boolean` | `hasError()`
`void` | `killCache()`
`void` | `reset()` Clears any data that exists in the buffer as well as the status code and headers.
`void` | `setBufferSize(int size)` Sets the preferred buffer size for the body of the response.
`void` | `setForbidForward(boolean forbid)`
`void` | `setHasError(boolean error)`
`void` | `setSessionId(java.lang.String id)`
`void` | `setStream(WriteStream os)`

Methods inherited from interface javax.servlet.http.HttpServletResponse
`addCookie, addDateHeader, addIntHeader, containsHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, sendError, sendError, sendRedirect, setDateHeader, setHeader, setIntHeader, setStatus, setStatus`

Methods inherited from interface javax.servlet.ServletResponse
`getCharacterEncoding, getLocale, getOutputStream, getWriter, isCommitted, resetBuffer, setContentLength, setContentType, setLocale`

Method Detail

### getBufferSize

    public int getBufferSize()

  Description copied from interface: `ServletResponse`
  Returns the actual buffer size used for the response. If no buffering is used, this method returns 0.
  Specified by:
    `getBufferSize` in interface `ServletResponse`
  Following copied from interface: `javax.servlet.ServletResponse`
  Returns:
    the actual buffer size used
  See Also:
    `ServletResponse.setBufferSize(int)`, `ServletResponse.flushBuffer()`, `ServletResponse.isCommitted()`, `ServletResponse.reset()`

### setBufferSize

    public void setBufferSize(int size)

  Description copied from interface: `ServletResponse`
  Sets the preferred buffer size for the body of the response. The servlet container will use a buffer at least as large as the size requested. The actual buffer size used can be found using `getBufferSize`.

  A larger buffer allows more content to be written before anything is actually sent, thus providing the servlet with more time to set appropriate status codes and headers. A smaller buffer decreases server memory load and allows the client to start receiving data more quickly.

  This method must be called before any response body content is written; if content has been written, this method throws an `IllegalStateException`.

  Specified by:
    `setBufferSize` in interface `ServletResponse`
  Following copied from interface: `javax.servlet.ServletResponse`
  Parameters:
    `size` - the preferred buffer size
  Throws:
    `java.lang.IllegalStateException` - if this method is called after content has been written
  See Also:
    `ServletResponse.getBufferSize()`, `ServletResponse.flushBuffer()`, `ServletResponse.isCommitted()`, `ServletResponse.reset()`

### reset

    public void reset()

  Description copied from interface: `ServletResponse`
  Clears any data that exists in the buffer as well as the status code and headers. If the response has been committed, this method throws an `IllegalStateException`.
  Specified by:
    `reset` in interface `ServletResponse`
  Following copied from interface: `javax.servlet.ServletResponse`
  Throws:
    `java.lang.IllegalStateException` - if the response has already been committed
  See Also:
    `ServletResponse.setBufferSize(int)`, `ServletResponse.getBufferSize()`, `ServletResponse.flushBuffer()`, `ServletResponse.isCommitted()`

### flushBuffer

    public void flushBuffer()
                     throws java.io.IOException

  Description copied from interface: `ServletResponse`
  Forces any content in the buffer to be written to the client. A call to this method automatically commits the response, meaning the status code and headers will be written.
  Specified by:
    `flushBuffer` in interface `ServletResponse`
  Following copied from interface: `javax.servlet.ServletResponse`
  See Also:
    `ServletResponse.setBufferSize(int)`, `ServletResponse.getBufferSize()`, `ServletResponse.isCommitted()`, `ServletResponse.reset()`

### addHeader

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

  Description copied from interface: `HttpServletResponse`
  Adds a response header with the given name and value. This method allows response headers to have multiple values.
  Specified by:
    `addHeader` in interface `HttpServletResponse`
  Following copied from interface: `javax.servlet.http.HttpServletResponse`
  Parameters:
    `name` - the name of the header
    `value` - the additional header value
  See Also:
    `HttpServletResponse.setHeader(java.lang.String, java.lang.String)`

### getStream

    public WriteStream getStream()
                          throws java.io.IOException

### setStream

    public void setStream(WriteStream os)

### getRemaining

    public int getRemaining()

### getChain

    public java.lang.String getChain()
                              throws java.io.IOException

### getHeader

    public java.lang.String getHeader(java.lang.String key)

### clearBuffer

    public void clearBuffer()

### close

    public void close()
               throws java.io.IOException

### disableHeaders

    public boolean disableHeaders(boolean disable)

### getForbidForward

    public boolean getForbidForward()

### setForbidForward

    public void setForbidForward(boolean forbid)

### hasError

    public boolean hasError()

### setHasError

    public void setHasError(boolean error)

### setSessionId

    public void setSessionId(java.lang.String id)

### killCache

    public void killCache()

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