KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > views > jsp > WebWorkMockHttpServletResponse


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.webwork.views.jsp;
6
7 import com.mockobjects.servlet.MockHttpServletResponse;
8
9 import java.io.ByteArrayOutputStream JavaDoc;
10 import java.io.IOException JavaDoc;
11 import java.io.PrintWriter JavaDoc;
12 import java.util.Locale JavaDoc;
13
14
15 /**
16  * WebWorkMockHttpServletResponse
17  *
18  * @author Jason Carreira
19  * Created May 21, 2003 10:46:53 AM
20  */

21 public class WebWorkMockHttpServletResponse extends MockHttpServletResponse {
22     private Locale JavaDoc locale;
23     //~ Methods ////////////////////////////////////////////////////////////////
24

25     public Locale JavaDoc getLocale() {
26         return locale;
27     }
28
29     public void setLocale(Locale JavaDoc locale) {
30         this.locale = locale;
31     }
32
33     public PrintWriter JavaDoc getWriter() throws IOException JavaDoc {
34         return new PrintWriter JavaDoc(new ByteArrayOutputStream JavaDoc());
35     }
36
37     public String JavaDoc encodeURL(String JavaDoc s) {
38         return s;
39     }
40
41     public String JavaDoc encodeUrl(String JavaDoc s) {
42         return s;
43     }
44 }
45
Popular Tags