1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.mock; |
17 | |
|
18 | |
import java.io.IOException; |
19 | |
import java.io.PrintWriter; |
20 | |
import java.io.Writer; |
21 | |
|
22 | |
import javax.faces.component.UIComponent; |
23 | |
import javax.faces.context.ResponseWriter; |
24 | |
|
25 | |
import org.seasar.framework.util.SPrintWriter; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | 2 | public class MockResponseWriter extends ResponseWriter { |
31 | |
|
32 | 2 | private PrintWriter writer = new SPrintWriter(); |
33 | |
|
34 | |
public String getContentType() { |
35 | 0 | return null; |
36 | |
} |
37 | |
|
38 | |
public String getCharacterEncoding() { |
39 | 0 | return null; |
40 | |
} |
41 | |
|
42 | |
public void flush() throws IOException { |
43 | 2 | writer.flush(); |
44 | 2 | } |
45 | |
|
46 | |
public void startDocument() throws IOException { |
47 | 1 | } |
48 | |
|
49 | |
public void endDocument() throws IOException { |
50 | 0 | } |
51 | |
|
52 | |
public void startElement(String s, UIComponent uicomponent) |
53 | |
throws IOException { |
54 | 0 | } |
55 | |
|
56 | |
public void endElement(String s) throws IOException { |
57 | 0 | } |
58 | |
|
59 | |
public void writeAttribute(String s, Object obj, String s1) |
60 | |
throws IOException { |
61 | 0 | } |
62 | |
|
63 | |
public void writeURIAttribute(String s, Object obj, String s1) |
64 | |
throws IOException { |
65 | 0 | } |
66 | |
|
67 | |
public void writeComment(Object obj) throws IOException { |
68 | 0 | } |
69 | |
|
70 | |
public void writeText(Object obj, String s) throws IOException { |
71 | 0 | } |
72 | |
|
73 | |
public void writeText(char[] ac, int i, int j) throws IOException { |
74 | 0 | } |
75 | |
|
76 | |
public ResponseWriter cloneWithWriter(Writer writer) { |
77 | 1 | return null; |
78 | |
} |
79 | |
|
80 | |
public void write(char[] cbuf, int off, int len) throws IOException { |
81 | 0 | writer.write(cbuf, off, len); |
82 | 0 | } |
83 | |
|
84 | |
public void close() throws IOException { |
85 | 0 | writer.close(); |
86 | 0 | } |
87 | |
|
88 | |
} |