Package org.apache.felix.http.jakartawrappers

# Class ServletResponseWrapper

java.lang.Object
org.apache.felix.http.jakartawrappers.ServletResponseWrapper

All Implemented Interfaces:
  `jakarta.servlet.ServletResponse`

Direct Known Subclasses:
  `HttpServletResponseWrapper`

public class ServletResponseWrapper extends Object implements jakarta.servlet.ServletResponse
Servlet response wrapper

## Constructor Summary

Constructors
Constructor
Description
`ServletResponseWrapper(javax.servlet.ServletResponse r)`
Create new response

## Method Summary

Modifier and Type
Method
Description
`void`
`flushBuffer()`
`int`
`getBufferSize()`
`String`
`getCharacterEncoding()`
`String`
`getContentType()`
`Locale`
`getLocale()`
`jakarta.servlet.ServletOutputStream`
`getOutputStream()`
`javax.servlet.ServletResponse`
`getResponse()`
Get the wrapped response
`static jakarta.servlet.ServletResponse`
`getWrapper(javax.servlet.ServletResponse r)`
Get a wrapper
`PrintWriter`
`getWriter()`
`boolean`
`isCommitted()`
`void`
`reset()`
`void`
`resetBuffer()`
`void`
`setBufferSize(int size)`
`void`
`setCharacterEncoding(String charset)`
`void`
`setContentLength(int len)`
`void`
`setContentLengthLong(long len)`
`void`
`setContentType(String type)`
`void`
`setLocale(Locale loc)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface jakarta.servlet.ServletResponse

`setCharacterEncoding`

## Constructor Details

### ServletResponseWrapper

public ServletResponseWrapper(@NotNull javax.servlet.ServletResponse r)
Create new response

Parameters:
  `r` - Wrapped response

## Method Details

### getWrapper

public static jakarta.servlet.ServletResponse getWrapper(javax.servlet.ServletResponse r)
Get a wrapper

Parameters:
  `r` - Response
Returns:
  Wrapped response

### getResponse

public javax.servlet.ServletResponse getResponse()
Get the wrapped response

Returns:
  The response

### getCharacterEncoding

public String getCharacterEncoding()

Specified by:
  `getCharacterEncoding` in interface `jakarta.servlet.ServletResponse`

### getContentType

public String getContentType()

Specified by:
  `getContentType` in interface `jakarta.servlet.ServletResponse`

### getOutputStream

public jakarta.servlet.ServletOutputStream getOutputStream() throws IOException

Specified by:
  `getOutputStream` in interface `jakarta.servlet.ServletResponse`
Throws:
  `IOException`

### getWriter

public PrintWriter getWriter() throws IOException

Specified by:
  `getWriter` in interface `jakarta.servlet.ServletResponse`
Throws:
  `IOException`

### setCharacterEncoding

public void setCharacterEncoding(String charset)

Specified by:
  `setCharacterEncoding` in interface `jakarta.servlet.ServletResponse`

### setContentLength

public void setContentLength(int len)

Specified by:
  `setContentLength` in interface `jakarta.servlet.ServletResponse`

### setContentLengthLong

public void setContentLengthLong(long len)

Specified by:
  `setContentLengthLong` in interface `jakarta.servlet.ServletResponse`

### setContentType

public void setContentType(String type)

Specified by:
  `setContentType` in interface `jakarta.servlet.ServletResponse`

### setBufferSize

public void setBufferSize(int size)

Specified by:
  `setBufferSize` in interface `jakarta.servlet.ServletResponse`

### getBufferSize

public int getBufferSize()

Specified by:
  `getBufferSize` in interface `jakarta.servlet.ServletResponse`

### flushBuffer

public void flushBuffer() throws IOException

Specified by:
  `flushBuffer` in interface `jakarta.servlet.ServletResponse`
Throws:
  `IOException`

### resetBuffer

public void resetBuffer()

Specified by:
  `resetBuffer` in interface `jakarta.servlet.ServletResponse`

### isCommitted

public boolean isCommitted()

Specified by:
  `isCommitted` in interface `jakarta.servlet.ServletResponse`

### reset

public void reset()

Specified by:
  `reset` in interface `jakarta.servlet.ServletResponse`

### setLocale

public void setLocale(Locale loc)

Specified by:
  `setLocale` in interface `jakarta.servlet.ServletResponse`

### getLocale

public Locale getLocale()

Specified by:
  `getLocale` in interface `jakarta.servlet.ServletResponse`