FormsHandlingResponse.java
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.servlet.ServletOutputStream
* org.apache.sling.api.SlingHttpServletResponse
* org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper
*/
package com.day.cq.wcm.foundation.forms.impl;
import java.io.OutputStream;
import java.io.PrintWriter;
import javax.servlet.ServletOutputStream;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.wrappers.SlingHttpServletResponseWrapper;
public class FormsHandlingResponse
extends SlingHttpServletResponseWrapper {
private ServletOutputStream nullstream;
private PrintWriter nullwriter;
public FormsHandlingResponse(SlingHttpServletResponse wrappedResponse) {
super(wrappedResponse);
}
public PrintWriter getWriter() {
if (this.nullwriter == null) {
this.nullwriter = new PrintWriter((OutputStream)this.getOutputStream());
}
return this.nullwriter;
}
public ServletOutputStream getOutputStream() {
if (this.nullstream == null) {
this.nullstream = new ServletOutputStream(){
public void write(int b) {
}
public void write(byte[] b) {
}
public void write(byte[] b, int off, int len) {
}
public void flush() {
}
public void close() {
}
};
}
return this.nullstream;
}
public void flushBuffer() {
}
public void reset() {
}
public void resetBuffer() {
}
}