KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > servlet > http > MockHttpServletResponse


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package javax.servlet.http;
5
6 import com.tc.exception.ImplementMe;
7
8 import java.io.PrintWriter JavaDoc;
9 import java.util.ArrayList JavaDoc;
10 import java.util.Locale JavaDoc;
11
12 import javax.servlet.ServletOutputStream JavaDoc;
13
14 public class MockHttpServletResponse implements HttpServletResponse JavaDoc {
15
16   private ArrayList JavaDoc cookies = new ArrayList JavaDoc();
17
18   public void addCookie(Cookie JavaDoc arg0) {
19     cookies.add(arg0);
20   }
21
22   public void addDateHeader(String JavaDoc arg0, long arg1) {
23     throw new ImplementMe();
24
25   }
26
27   public void addHeader(String JavaDoc arg0, String JavaDoc arg1) {
28     throw new ImplementMe();
29
30   }
31
32   public void addIntHeader(String JavaDoc arg0, int arg1) {
33     throw new ImplementMe();
34
35   }
36
37   public boolean containsHeader(String JavaDoc arg0) {
38     throw new ImplementMe();
39   }
40
41   public String JavaDoc encodeRedirectURL(String JavaDoc arg0) {
42     throw new ImplementMe();
43   }
44
45   public String JavaDoc encodeRedirectUrl(String JavaDoc arg0) {
46     throw new ImplementMe();
47   }
48
49   public String JavaDoc encodeURL(String JavaDoc arg0) {
50     throw new ImplementMe();
51   }
52
53   public String JavaDoc encodeUrl(String JavaDoc arg0) {
54     throw new ImplementMe();
55   }
56
57   public void sendError(int arg0) {
58     throw new ImplementMe();
59
60   }
61
62   public void sendError(int arg0, String JavaDoc arg1) {
63     throw new ImplementMe();
64
65   }
66
67   public void sendRedirect(String JavaDoc arg0) {
68     throw new ImplementMe();
69
70   }
71
72   public void setDateHeader(String JavaDoc arg0, long arg1) {
73     throw new ImplementMe();
74
75   }
76
77   public void setHeader(String JavaDoc arg0, String JavaDoc arg1) {
78     throw new ImplementMe();
79
80   }
81
82   public void setIntHeader(String JavaDoc arg0, int arg1) {
83     throw new ImplementMe();
84
85   }
86
87   public void setStatus(int arg0) {
88     throw new ImplementMe();
89
90   }
91
92   public void setStatus(int arg0, String JavaDoc arg1) {
93     throw new ImplementMe();
94
95   }
96
97   public void flushBuffer() {
98     throw new ImplementMe();
99
100   }
101
102   public int getBufferSize() {
103     throw new ImplementMe();
104   }
105
106   public String JavaDoc getCharacterEncoding() {
107     throw new ImplementMe();
108   }
109
110   public String JavaDoc getContentType() {
111     throw new ImplementMe();
112   }
113
114   public Locale JavaDoc getLocale() {
115     throw new ImplementMe();
116   }
117
118   public ServletOutputStream JavaDoc getOutputStream() {
119     throw new ImplementMe();
120   }
121
122   public PrintWriter JavaDoc getWriter() {
123     throw new ImplementMe();
124   }
125
126   public boolean isCommitted() {
127     throw new ImplementMe();
128   }
129
130   public void reset() {
131     throw new ImplementMe();
132
133   }
134
135   public void resetBuffer() {
136     throw new ImplementMe();
137
138   }
139
140   public void setBufferSize(int arg0) {
141     throw new ImplementMe();
142
143   }
144
145   public void setCharacterEncoding(String JavaDoc arg0) {
146     throw new ImplementMe();
147
148   }
149
150   public void setContentLength(int arg0) {
151     throw new ImplementMe();
152
153   }
154
155   public void setContentType(String JavaDoc arg0) {
156     throw new ImplementMe();
157
158   }
159
160   public void setLocale(Locale JavaDoc arg0) {
161     throw new ImplementMe();
162
163   }
164
165   public Cookie JavaDoc[] getCookies() {
166     return (Cookie JavaDoc[]) cookies.toArray(new Cookie JavaDoc[cookies.size()]);
167   }
168
169 }
170
Popular Tags