1 17 package javax.servlet.http; 18 19 import java.io.IOException ; 20 21 import javax.servlet.ServletResponseWrapper ; 22 23 37 38 public class HttpServletResponseWrapper extends ServletResponseWrapper implements HttpServletResponse { 39 40 41 45 public HttpServletResponseWrapper(HttpServletResponse response) { 46 super(response); 47 } 48 49 private HttpServletResponse _getHttpServletResponse() { 50 return (HttpServletResponse ) super.getResponse(); 51 } 52 53 57 public void addCookie(Cookie cookie) { 58 this._getHttpServletResponse().addCookie(cookie); 59 } 60 61 65 66 67 public boolean containsHeader(String name) { 68 return this._getHttpServletResponse().containsHeader(name); 69 } 70 71 75 public String encodeURL(String url) { 76 return this._getHttpServletResponse().encodeURL(url); 77 } 78 79 83 public String encodeRedirectURL(String url) { 84 return this._getHttpServletResponse().encodeRedirectURL(url); 85 } 86 87 91 public String encodeUrl(String url) { 92 return this._getHttpServletResponse().encodeUrl(url); 93 } 94 95 99 public String encodeRedirectUrl(String url) { 100 return this._getHttpServletResponse().encodeRedirectUrl(url); 101 } 102 103 107 public void sendError(int sc, String msg) throws IOException { 108 this._getHttpServletResponse().sendError(sc, msg); 109 } 110 111 115 116 117 public void sendError(int sc) throws IOException { 118 this._getHttpServletResponse().sendError(sc); 119 } 120 121 125 public void sendRedirect(String location) throws IOException { 126 this._getHttpServletResponse().sendRedirect(location); 127 } 128 129 133 public void setDateHeader(String name, long date) { 134 this._getHttpServletResponse().setDateHeader(name, date); 135 } 136 137 141 public void addDateHeader(String name, long date) { 142 this._getHttpServletResponse().addDateHeader(name, date); 143 } 144 145 149 public void setHeader(String name, String value) { 150 this._getHttpServletResponse().setHeader(name, value); 151 } 152 153 157 public void addHeader(String name, String value) { 158 this._getHttpServletResponse().addHeader(name, value); 159 } 160 161 165 public void setIntHeader(String name, int value) { 166 this._getHttpServletResponse().setIntHeader(name, value); 167 } 168 169 173 public void addIntHeader(String name, int value) { 174 this._getHttpServletResponse().addIntHeader(name, value); 175 } 176 177 181 182 183 public void setStatus(int sc) { 184 this._getHttpServletResponse().setStatus(sc); 185 } 186 187 191 public void setStatus(int sc, String sm) { 192 this._getHttpServletResponse().setStatus(sc, sm); 193 } 194 195 196 } 197 | Popular Tags |