01: package com.icesoft.faces.webapp.http.common;
02:
03: import java.io.IOException;
04: import java.io.InputStream;
05: import java.io.OutputStream;
06: import java.util.Date;
07:
08: public class ResponseProxy implements Response {
09: protected Response response;
10:
11: public ResponseProxy(Response response) {
12: this .response = response;
13: }
14:
15: public void setStatus(int code) {
16: response.setStatus(code);
17: }
18:
19: public void setHeader(String name, String value) {
20: response.setHeader(name, value);
21: }
22:
23: public void setHeader(String name, String[] values) {
24: response.setHeader(name, values);
25: }
26:
27: public void setHeader(String name, Date value) {
28: response.setHeader(name, value);
29: }
30:
31: public void setHeader(String name, int value) {
32: response.setHeader(name, value);
33: }
34:
35: public void setHeader(String name, long value) {
36: response.setHeader(name, value);
37: }
38:
39: public OutputStream writeBody() throws IOException {
40: return response.writeBody();
41: }
42:
43: public void writeBodyFrom(InputStream in) throws IOException {
44: response.writeBodyFrom(in);
45: }
46: }
|