home *** CD-ROM | disk | FTP | other *** search
- package javax.servlet.http;
-
- import java.io.IOException;
- import java.io.OutputStreamWriter;
- import java.io.PrintWriter;
- import java.io.UnsupportedEncodingException;
- import javax.servlet.ServletOutputStream;
-
- class NoBodyResponse implements HttpServletResponse {
- private HttpServletResponse resp;
- private NoBodyOutputStream noBody;
- private PrintWriter writer;
- private boolean didSetContentLength;
-
- NoBodyResponse(HttpServletResponse var1) {
- this.resp = var1;
- this.noBody = new NoBodyOutputStream();
- }
-
- void setContentLength() {
- if (!this.didSetContentLength) {
- this.resp.setContentLength(this.noBody.getContentLength());
- }
-
- }
-
- public void setContentLength(int var1) {
- this.resp.setContentLength(var1);
- this.didSetContentLength = true;
- }
-
- public void setContentType(String var1) {
- this.resp.setContentType(var1);
- }
-
- public ServletOutputStream getOutputStream() throws IOException {
- return this.noBody;
- }
-
- public String getCharacterEncoding() {
- return this.resp.getCharacterEncoding();
- }
-
- public PrintWriter getWriter() throws UnsupportedEncodingException {
- if (this.writer == null) {
- OutputStreamWriter var1 = new OutputStreamWriter(this.noBody, this.getCharacterEncoding());
- this.writer = new PrintWriter(var1);
- }
-
- return this.writer;
- }
-
- public void addCookie(Cookie var1) {
- this.resp.addCookie(var1);
- }
-
- public boolean containsHeader(String var1) {
- return this.resp.containsHeader(var1);
- }
-
- public void setStatus(int var1, String var2) {
- this.resp.setStatus(var1, var2);
- }
-
- public void setStatus(int var1) {
- this.resp.setStatus(var1);
- }
-
- public void setHeader(String var1, String var2) {
- this.resp.setHeader(var1, var2);
- }
-
- public void setIntHeader(String var1, int var2) {
- this.resp.setIntHeader(var1, var2);
- }
-
- public void setDateHeader(String var1, long var2) {
- this.resp.setDateHeader(var1, var2);
- }
-
- public void sendError(int var1, String var2) throws IOException {
- this.resp.sendError(var1, var2);
- }
-
- public void sendError(int var1) throws IOException {
- this.resp.sendError(var1);
- }
-
- public void sendRedirect(String var1) throws IOException {
- this.resp.sendRedirect(var1);
- }
-
- public String encodeUrl(String var1) {
- return this.resp.encodeUrl(var1);
- }
-
- public String encodeRedirectUrl(String var1) {
- return this.resp.encodeRedirectUrl(var1);
- }
- }
-