KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > core > DummyResponse


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18
19 package org.apache.catalina.core;
20
21
22 import java.io.IOException JavaDoc;
23 import java.io.OutputStream JavaDoc;
24 import java.io.PrintWriter JavaDoc;
25 import java.util.Locale JavaDoc;
26
27 import javax.servlet.ServletOutputStream JavaDoc;
28 import javax.servlet.ServletResponse JavaDoc;
29 import javax.servlet.http.Cookie JavaDoc;
30 import javax.servlet.http.HttpServletResponse JavaDoc;
31
32 import org.apache.catalina.Context;
33 import org.apache.catalina.connector.Connector;
34 import org.apache.catalina.connector.Request;
35
36
37 /**
38  * Dummy response object, used for JSP precompilation.
39  *
40  * @author Remy Maucherat
41  * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
42  */

43
44 public class DummyResponse
45     implements HttpServletResponse JavaDoc {
46
47     public DummyResponse() {
48     }
49
50
51     public void setAppCommitted(boolean appCommitted) {}
52     public boolean isAppCommitted() { return false; }
53     public Connector getConnector() { return null; }
54     public void setConnector(Connector connector) {}
55     public int getContentCount() { return -1; }
56     public Context getContext() { return null; }
57     public void setContext(Context context) {}
58     public boolean getIncluded() { return false; }
59     public void setIncluded(boolean included) {}
60     public String JavaDoc getInfo() { return null; }
61     public Request getRequest() { return null; }
62     public void setRequest(Request request) {}
63     public ServletResponse JavaDoc getResponse() { return null; }
64     public OutputStream JavaDoc getStream() { return null; }
65     public void setStream(OutputStream JavaDoc stream) {}
66     public void setSuspended(boolean suspended) {}
67     public boolean isSuspended() { return false; }
68     public void setError() {}
69     public boolean isError() { return false; }
70     public ServletOutputStream JavaDoc createOutputStream() throws IOException JavaDoc {
71         return null;
72     }
73     public void finishResponse() throws IOException JavaDoc {}
74     public int getContentLength() { return -1; }
75     public String JavaDoc getContentType() { return null; }
76     public PrintWriter JavaDoc getReporter() { return null; }
77     public void recycle() {}
78     public void write(int b) throws IOException JavaDoc {}
79     public void write(byte b[]) throws IOException JavaDoc {}
80     public void write(byte b[], int off, int len) throws IOException JavaDoc {}
81     public void flushBuffer() throws IOException JavaDoc {}
82     public int getBufferSize() { return -1; }
83     public String JavaDoc getCharacterEncoding() { return null; }
84     public void setCharacterEncoding(String JavaDoc charEncoding) {}
85     public ServletOutputStream JavaDoc getOutputStream() throws IOException JavaDoc {
86         return null;
87     }
88     public Locale JavaDoc getLocale() { return null; }
89     public PrintWriter JavaDoc getWriter() throws IOException JavaDoc { return null; }
90     public boolean isCommitted() { return false; }
91     public void reset() {}
92     public void resetBuffer() {}
93     public void setBufferSize(int size) {}
94     public void setContentLength(int length) {}
95     public void setContentType(String JavaDoc type) {}
96     public void setLocale(Locale JavaDoc locale) {}
97
98     public Cookie JavaDoc[] getCookies() { return null; }
99     public String JavaDoc getHeader(String JavaDoc name) { return null; }
100     public String JavaDoc[] getHeaderNames() { return null; }
101     public String JavaDoc[] getHeaderValues(String JavaDoc name) { return null; }
102     public String JavaDoc getMessage() { return null; }
103     public int getStatus() { return -1; }
104     public void reset(int status, String JavaDoc message) {}
105     public void addCookie(Cookie JavaDoc cookie) {}
106     public void addDateHeader(String JavaDoc name, long value) {}
107     public void addHeader(String JavaDoc name, String JavaDoc value) {}
108     public void addIntHeader(String JavaDoc name, int value) {}
109     public boolean containsHeader(String JavaDoc name) { return false; }
110     public String JavaDoc encodeRedirectURL(String JavaDoc url) { return null; }
111     public String JavaDoc encodeRedirectUrl(String JavaDoc url) { return null; }
112     public String JavaDoc encodeURL(String JavaDoc url) { return null; }
113     public String JavaDoc encodeUrl(String JavaDoc url) { return null; }
114     public void sendAcknowledgement() throws IOException JavaDoc {}
115     public void sendError(int status) throws IOException JavaDoc {}
116     public void sendError(int status, String JavaDoc message) throws IOException JavaDoc {}
117     public void sendRedirect(String JavaDoc location) throws IOException JavaDoc {}
118     public void setDateHeader(String JavaDoc name, long value) {}
119     public void setHeader(String JavaDoc name, String JavaDoc value) {}
120     public void setIntHeader(String JavaDoc name, int value) {}
121     public void setStatus(int status) {}
122     public void setStatus(int status, String JavaDoc message) {}
123
124
125 }
126
Popular Tags