1 28 29 package com.caucho.server.connection; 30 31 import com.caucho.vfs.WriteStream; 32 33 import javax.servlet.http.Cookie ; 34 import java.io.IOException ; 35 import java.util.Locale ; 36 37 public class StubServletResponse extends AbstractHttpResponse { 39 public StubServletResponse() 40 { 41 try { 42 start(); 43 } catch (Throwable e) { 44 } 45 } 46 47 public String getCharacterEncoding() 48 { 49 return "ISO-8859-1"; 50 } 51 52 public void setLocale(Locale locale) 53 { 54 } 55 56 public Locale getLocale() 57 { 58 return null; 59 } 60 61 public boolean writeHeadersInt(WriteStream out, int length) 62 { 63 return false; 64 } 65 66 public void setBufferSize(int size) 67 { 68 } 69 70 public int getBufferSize() 71 { 72 return 0; 73 } 74 75 public void flushBuffer() 76 { 77 } 78 79 public boolean isCommitted() 80 { 81 return false; 82 } 83 84 public void reset() 85 { 86 } 87 88 public void resetBuffer() 89 { 90 } 91 92 public void setContentLength(int length) 93 { 94 } 95 96 public void setContentType(String type) 97 { 98 } 99 100 public void setStatus(int status) 101 { 102 } 103 104 public void setStatus(int status, String messages) 105 { 106 } 107 108 public void sendRedirect(String location) 109 { 110 } 111 112 public void sendError(int i) 113 { 114 } 115 116 public void sendError(int i, String message) 117 { 118 } 119 120 public String encodeUrl(String url) 121 { 122 return url; 123 } 124 125 public String encodeURL(String url) 126 { 127 return url; 128 } 129 130 public String encodeRedirectUrl(String url) 131 { 132 return url; 133 } 134 135 public String encodeRedirectURL(String url) 136 { 137 return url; 138 } 139 140 public void addCookie(Cookie cookie) 141 { 142 } 143 144 public boolean containsHeader(String header) 145 { 146 return false; 147 } 148 149 public void setHeader(String header, String value) 150 { 151 } 152 153 public void setIntHeader(String header, int value) 154 { 155 } 156 157 public void setDateHeader(String header, long value) 158 { 159 } 160 161 public void addHeader(String header, String value) 162 { 163 } 164 165 public void addIntHeader(String header, int value) 166 { 167 } 168 169 public void addDateHeader(String header, long value) 170 { 171 } 172 173 public String getHeader(String key) 174 { 175 return null; 176 } 177 178 public void clearBuffer() 179 { 180 } 181 182 public void close() throws IOException 183 { 184 } 185 186 public boolean disableHeaders(boolean disable) 187 { 188 return false; 189 } 190 191 public int getRemaining() 192 { 193 return 0; 194 } 195 196 public void setForbidForward(boolean forbid) 197 { 198 } 199 200 public boolean getForbidForward() 201 { 202 return false; 203 } 204 205 public void setHasError(boolean hasError) 206 { 207 } 208 209 public boolean hasError() 210 { 211 return true; 212 } 213 214 public void killCache() 215 { 216 } 217 218 public void setPrivateCache(boolean isPrivate) 219 { 220 } 221 222 public void setSessionId(String id) 223 { 224 } 225 } 226 | Popular Tags |