1 package de.halbekunst.juplo.cachecontrol;
3 import java.io.IOException;
4 import java.io.PrintWriter;
5 import java.util.Locale;
6 import javax.servlet.Filter;
7 import javax.servlet.FilterChain;
8 import javax.servlet.FilterConfig;
9 import javax.servlet.ServletException;
10 import javax.servlet.ServletOutputStream;
11 import javax.servlet.ServletRequest;
12 import javax.servlet.ServletResponse;
13 import javax.servlet.http.Cookie;
14 import javax.servlet.http.HttpServletResponse;
20 public class CacheControlFilter implements Filter {
24 public void init(FilterConfig filterConfig) throws ServletException {
25 throw new UnsupportedOperationException("Not supported yet.");
29 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
30 throw new UnsupportedOperationException("Not supported yet.");
34 public void destroy() {
35 throw new UnsupportedOperationException("Not supported yet.");
39 class HttpServletResponseWrapper implements HttpServletResponse {
41 private final HttpServletResponse response;
44 HttpServletResponseWrapper(HttpServletResponse response) {
45 this.response = response;
50 public void addCookie(Cookie cookie) {
51 throw new UnsupportedOperationException("Not supported yet.");
55 public boolean containsHeader(String name) {
56 return response.containsHeader(name);
60 public String encodeURL(String url) {
61 return response.encodeURL(url);
65 public String encodeRedirectURL(String url) {
66 return response.encodeRedirectURL(url);
70 public String encodeUrl(String url) {
71 return response.encodeUrl(url);
75 public String encodeRedirectUrl(String url) {
76 return response.encodeRedirectUrl(url);
80 public void sendError(int sc, String msg) throws IOException {
81 throw new UnsupportedOperationException("Not supported yet.");
85 public void sendError(int sc) throws IOException {
86 throw new UnsupportedOperationException("Not supported yet.");
90 public void sendRedirect(String location) throws IOException {
91 throw new UnsupportedOperationException("Not supported yet.");
95 public void setDateHeader(String name, long date) {
96 throw new UnsupportedOperationException("Not supported yet.");
100 public void addDateHeader(String name, long date) {
101 throw new UnsupportedOperationException("Not supported yet.");
105 public void setHeader(String name, String value) {
106 throw new UnsupportedOperationException("Not supported yet.");
110 public void addHeader(String name, String value) {
111 throw new UnsupportedOperationException("Not supported yet.");
115 public void setIntHeader(String name, int value) {
116 throw new UnsupportedOperationException("Not supported yet.");
120 public void addIntHeader(String name, int value) {
121 throw new UnsupportedOperationException("Not supported yet.");
125 public void setStatus(int sc) {
126 throw new UnsupportedOperationException("Not supported yet.");
130 public void setStatus(int sc, String sm) {
131 throw new UnsupportedOperationException("Not supported yet.");
135 public String getCharacterEncoding() {
136 return response.getCharacterEncoding();
140 public String getContentType() {
141 return response.getContentType();
145 public ServletOutputStream getOutputStream() throws IOException {
146 throw new UnsupportedOperationException("Not supported yet.");
150 public PrintWriter getWriter() throws IOException {
151 throw new UnsupportedOperationException("Not supported yet.");
155 public void setCharacterEncoding(String charset) {
156 response.setCharacterEncoding(charset);
160 public void setContentLength(int len) {
161 throw new UnsupportedOperationException("Not supported yet.");
165 public void setContentType(String type) {
166 response.setContentType(type);
170 public void setBufferSize(int size) {
171 throw new UnsupportedOperationException("Not supported yet.");
175 public int getBufferSize() {
176 throw new UnsupportedOperationException("Not supported yet.");
180 public void flushBuffer() throws IOException {
181 throw new UnsupportedOperationException("Not supported yet.");
185 public void resetBuffer() {
186 throw new UnsupportedOperationException("Not supported yet.");
190 public boolean isCommitted() {
191 throw new UnsupportedOperationException("Not supported yet.");
195 public void reset() {
196 throw new UnsupportedOperationException("Not supported yet.");
200 public void setLocale(Locale loc) {
201 response.setLocale(loc);
205 public Locale getLocale() {
206 return response.getLocale();