package org.jboss.resteasy.core;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.Locale;
import javax.servlet.ServletOutputStream;
import javax.servlet.ServletResponse;
import javax.servlet.ServletResponseWrapper;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
public class ResteasyHttpServletResponseWrapper extends ServletResponseWrapper implements HttpServletResponse
{
private HttpServletResponse response;
private HttpServletResponse proxy;
public ResteasyHttpServletResponseWrapper(final HttpServletResponse response, final HttpServletResponse proxy)
{
super(response);
this.proxy = proxy;
this.response = response;
}
public HttpServletResponse getHttpServletResponse()
{
return response;
}
@Override
public ServletResponse getResponse()
{
return response;
}
@Override
public String getCharacterEncoding()
{
return proxy.getCharacterEncoding();
}
@Override
public String getContentType()
{
return proxy.getContentType();
}
@Override
public ServletOutputStream getOutputStream() throws IOException
{
return proxy.getOutputStream();
}
@Override
public PrintWriter getWriter() throws IOException
{
return proxy.getWriter();
}
@Override
public void setCharacterEncoding(String charset)
{
proxy.setCharacterEncoding(charset);
}
@Override
public void setContentLength(int len)
{
proxy.setContentLength(len);
}
@Override
public void setContentType(String type)
{
proxy.setContentType(type);
}
@Override
public void setBufferSize(int size)
{
proxy.setBufferSize(size);
}
@Override
public int getBufferSize()
{
return proxy.getBufferSize();
}
@Override
public void flushBuffer() throws IOException
{
proxy.flushBuffer();
}
@Override
public void resetBuffer()
{
proxy.resetBuffer();
}
@Override
public boolean isCommitted()
{
return proxy.isCommitted();
}
@Override
public void reset()
{
proxy.reset();
}
@Override
public void setLocale(Locale loc)
{
proxy.setLocale(loc);
}
@Override
public Locale getLocale()
{
return proxy.getLocale();
}
@Override
public void addCookie(Cookie cookie)
{
proxy.addCookie(cookie);
}
@Override
public boolean (String name)
{
return proxy.containsHeader(name);
}
@Override
public String encodeURL(String url)
{
return proxy.encodeURL(url);
}
@Override
public String encodeRedirectURL(String url)
{
return proxy.encodeRedirectURL(url);
}
@Override
public String encodeUrl(String url)
{
return proxy.encodeUrl(url);
}
@Override
public String encodeRedirectUrl(String url)
{
return proxy.encodeRedirectUrl(url);
}
@Override
public void sendError(int sc, String msg) throws IOException
{
proxy.sendError(sc, msg);
}
@Override
public void sendError(int sc) throws IOException
{
proxy.sendError(sc);
}
@Override
public void sendRedirect(String location) throws IOException
{
proxy.sendRedirect(location);
}
@Override
public void (String name, long date)
{
proxy.setDateHeader(name, date);
}
@Override
public void (String name, long date)
{
proxy.addDateHeader(name, date);
}
@Override
public void (String name, String value)
{
proxy.setHeader(name, value);
}
@Override
public void (String name, String value)
{
proxy.addHeader(name, value);
}
@Override
public void (String name, int value)
{
proxy.setIntHeader(name, value);
}
@Override
public void (String name, int value)
{
proxy.addIntHeader(name, value);
}
@Override
public void setStatus(int sc)
{
proxy.setStatus(sc);
}
@Override
public void setStatus(int sc, String sm)
{
proxy.setStatus(sc, sm);
}
@Override
public int getStatus()
{
return 0;
}
@Override
public String (String name)
{
return null;
}
@Override
public Collection<String> (String name)
{
return null;
}
@Override
public Collection<String> ()
{
return null;
}
}