1 18 19 20 package org.apache.struts.mock; 21 22 23 import java.io.IOException ; 24 import java.io.PrintWriter ; 25 import java.util.Locale ; 26 import javax.servlet.ServletOutputStream ; 27 import javax.servlet.http.Cookie ; 28 import javax.servlet.http.HttpServletResponse ; 29 30 31 32 48 49 public class MockHttpServletResponse implements HttpServletResponse { 50 51 52 53 55 56 58 59 60 61 63 64 public void addCookie(Cookie cookie) { 65 throw new UnsupportedOperationException (); 66 } 67 68 69 public void addDateHeader(String name, long value) { 70 throw new UnsupportedOperationException (); 71 } 72 73 74 public void addHeader(String name, String value) { 75 throw new UnsupportedOperationException (); 76 } 77 78 79 public void addIntHeader(String name, int value) { 80 throw new UnsupportedOperationException (); 81 } 82 83 84 public boolean containsHeader(String name) { 85 throw new UnsupportedOperationException (); 86 } 87 88 89 public String encodeRedirectUrl(String url) { 90 return (encodeRedirectURL(url)); 91 } 92 93 94 public String encodeRedirectURL(String url) { 95 return (url); 96 } 97 98 99 public String encodeUrl(String url) { 100 return (encodeURL(url)); 101 } 102 103 104 public String encodeURL(String url) { 105 return (url); 106 } 107 108 109 public void sendError(int status) { 110 throw new UnsupportedOperationException (); 111 } 112 113 114 public void sendError(int status, String message) { 115 throw new UnsupportedOperationException (); 116 } 117 118 119 public void sendRedirect(String location) { 120 throw new UnsupportedOperationException (); 121 } 122 123 124 public void setDateHeader(String name, long value) { 125 throw new UnsupportedOperationException (); 126 } 127 128 129 public void setHeader(String name, String value) { 130 throw new UnsupportedOperationException (); 131 } 132 133 134 public void setIntHeader(String name, int value) { 135 throw new UnsupportedOperationException (); 136 } 137 138 139 public void setStatus(int status) { 140 throw new UnsupportedOperationException (); 141 } 142 143 144 public void setStatus(int status, String message) { 145 throw new UnsupportedOperationException (); 146 } 147 148 149 151 152 public void flushBuffer() { 153 throw new UnsupportedOperationException (); 154 } 155 156 157 public int getBufferSize() { 158 throw new UnsupportedOperationException (); 159 } 160 161 162 public String getCharacterEncoding() { 163 throw new UnsupportedOperationException (); 164 } 165 166 167 public Locale getLocale() { 168 throw new UnsupportedOperationException (); 169 } 170 171 172 public ServletOutputStream getOutputStream() throws IOException { 173 throw new UnsupportedOperationException (); 174 } 175 176 177 public PrintWriter getWriter() throws IOException { 178 throw new UnsupportedOperationException (); 179 } 180 181 182 public boolean isCommitted() { 183 throw new UnsupportedOperationException (); 184 } 185 186 187 public void reset() { 188 throw new UnsupportedOperationException (); 189 } 190 191 192 public void resetBuffer() { 193 throw new UnsupportedOperationException (); 194 } 195 196 197 public void setBufferSize(int size) { 198 throw new UnsupportedOperationException (); 199 } 200 201 202 public void setContentLength(int length) { 203 throw new UnsupportedOperationException (); 204 } 205 206 207 public void setContentType(String type) { 208 throw new UnsupportedOperationException (); 209 } 210 211 212 public void setLocale(Locale locale) { 213 throw new UnsupportedOperationException (); 214 } 215 216 217 } 218 | Popular Tags |