1 16 17 package org.apache.tester; 18 19 20 import java.io.*; 21 import java.util.*; 22 import javax.servlet.*; 23 import javax.servlet.http.*; 24 25 32 33 public class TesterHttpServletResponseWrapper 34 extends HttpServletResponseWrapper { 35 36 37 39 40 45 public TesterHttpServletResponseWrapper(HttpServletResponse response) { 46 47 super(response); 48 49 } 50 51 52 54 55 57 58 public void addCookie(Cookie cookie) { 59 StaticLogger.write("TesterHttpServletResponseWrapper.addCookie()"); 60 ((HttpServletResponse) getResponse()).addCookie(cookie); 61 } 62 63 64 public void addDateHeader(String name, long value) { 65 StaticLogger.write("TesterHttpServletResponseWrapper.addDateHeader()"); 66 ((HttpServletResponse) getResponse()).addDateHeader(name, value); 67 } 68 69 70 public void addHeader(String name, String value) { 71 StaticLogger.write("TesterHttpServletResponseWrapper.addHeader()"); 72 ((HttpServletResponse) getResponse()).addHeader(name, value); 73 } 74 75 76 public void addIntHeader(String name, int value) { 77 StaticLogger.write("TesterHttpServletResponseWrapper.addIntHeader()"); 78 ((HttpServletResponse) getResponse()).addIntHeader(name, value); 79 } 80 81 82 public boolean containsHeader(String name) { 83 StaticLogger.write("TesterHttpServletResponseWrapper.containsHeader()"); 84 return (((HttpServletResponse) getResponse()).containsHeader(name)); 85 } 86 87 88 public String encodeURL(String url) { 89 StaticLogger.write("TesterHttpServletResponseWrapper.encodeURL()"); 90 return (((HttpServletResponse) getResponse()).encodeURL(url)); 91 } 92 93 94 public String encodeUrl(String url) { 95 StaticLogger.write("TesterHttpServletResponseWrapper.encodeUrl()"); 96 return (((HttpServletResponse) getResponse()).encodeUrl(url)); 97 } 98 99 100 public String encodeRedirectURL(String url) { 101 StaticLogger.write("TesterHttpServletResponseWrapper.encodeRedirectURL()"); 102 return (((HttpServletResponse) getResponse()).encodeRedirectURL(url)); 103 } 104 105 106 public String encodeRedirectUrl(String url) { 107 StaticLogger.write("TesterHttpServletResponseWrapper.encodeRedirectUrl()"); 108 return (((HttpServletResponse) getResponse()).encodeRedirectUrl(url)); 109 } 110 111 112 public void flushBuffer() throws IOException { 113 StaticLogger.write("TesterHttpServletResponseWrapper.flushBuffer()"); 114 getResponse().flushBuffer(); 115 } 116 117 118 public int getBufferSize() { 119 StaticLogger.write("TesterHttpServletResponseWrapper.getBufferSize()"); 120 return (getResponse().getBufferSize()); 121 } 122 123 124 public String getCharacterEncoding() { 125 StaticLogger.write("TesterHttpServletResponseWrapper.getCharacterEncoding()"); 126 return (getResponse().getCharacterEncoding()); 127 } 128 129 130 public Locale getLocale() { 131 StaticLogger.write("TesterHttpServletResponseWrapper.getLocale()"); 132 return (getResponse().getLocale()); 133 } 134 135 136 public ServletOutputStream getOutputStream() throws IOException { 137 StaticLogger.write("TesterHttpServletResponseWrapper.getOutputStream()"); 138 return (getResponse().getOutputStream()); 139 } 140 141 142 public PrintWriter getWriter() throws IOException { 143 StaticLogger.write("TesterHttpServletResponseWrapper.getWriter()"); 144 return (getResponse().getWriter()); 145 } 146 147 148 public boolean isCommitted() { 149 StaticLogger.write("TesterHttpServletResponseWrapper.isCommitted()"); 150 return (getResponse().isCommitted()); 151 } 152 153 154 public void reset() { 155 StaticLogger.write("TesterHttpServletResponseWrapper.reset()"); 156 getResponse().reset(); 157 } 158 159 160 public void resetBuffer() { 161 StaticLogger.write("TesterHttpServletResponseWrapper.resetBuffer()"); 162 getResponse().resetBuffer(); 163 } 164 165 166 public void sendError(int sc) throws IOException { 167 StaticLogger.write("TesterHttpServletResponseWrapper.sendError(i)"); 168 ((HttpServletResponse) getResponse()).sendError(sc); 169 } 170 171 172 public void sendError(int sc, String msg) throws IOException { 173 StaticLogger.write("TesterHttpServletResponseWrapper.sendError(i,s)"); 174 ((HttpServletResponse) getResponse()).sendError(sc, msg); 175 } 176 177 178 public void sendRedirect(String location) throws IOException { 179 StaticLogger.write("TesterHttpServletResponseWrapper.sendRedirect()"); 180 ((HttpServletResponse) getResponse()).sendRedirect(location); 181 } 182 183 184 public void setBufferSize(int size) { 185 StaticLogger.write("TesterHttpServletResponseWrapper.setBufferSize()"); 186 getResponse().setBufferSize(size); 187 } 188 189 190 public void setContentLength(int len) { 191 StaticLogger.write("TesterHttpServletResponseWrapper.setContentLength()"); 192 getResponse().setContentLength(len); 193 } 194 195 196 public void setContentType(String type) { 197 StaticLogger.write("TesterHttpServletResponseWrapper.setContentType()"); 198 getResponse().setContentType(type); 199 } 200 201 202 public void setDateHeader(String name, long value) { 203 StaticLogger.write("TesterHttpServletResponseWrapper.setDateHeader()"); 204 ((HttpServletResponse) getResponse()).setDateHeader(name, value); 205 } 206 207 208 public void setHeader(String name, String value) { 209 StaticLogger.write("TesterHttpServletResponseWrapper.setHeader()"); 210 ((HttpServletResponse) getResponse()).setHeader(name, value); 211 } 212 213 214 public void setIntHeader(String name, int value) { 215 StaticLogger.write("TesterHttpServletResponseWrapper.setIntHeader()"); 216 ((HttpServletResponse) getResponse()).setIntHeader(name, value); 217 } 218 219 220 public void setLocale(Locale locale) { 221 StaticLogger.write("TesterHttpServletResponseWrapper.setLocale()"); 222 getResponse().setLocale(locale); 223 } 224 225 226 public void setStatus(int sc) { 227 StaticLogger.write("TesterHttpServletResponseWrapper.setStatus(i)"); 228 ((HttpServletResponse) getResponse()).setStatus(sc); 229 } 230 231 232 public void setStatus(int sc, String msg) { 233 StaticLogger.write("TesterHttpServletResponseWrapper.setStatus(i,s)"); 234 ((HttpServletResponse) getResponse()).setStatus(sc, msg); 235 } 236 237 238 } 239 | Popular Tags |