@Override public void addCookie(Cookie cookie) { super.addCookie(cookie); cookies.add(cookie); }
public void addIntHeader(String name, int value) { addHeader(name, String.valueOf(value)); }
public String encodeRedirectUrl(String url) { return encodeRedirectURL(url); }
public void reset() { if(isCommitted()){ throw new IllegalStateException(); } resetBuffer(); }
public void setContentType(String type) { if(null == type){ throw new NullPointerException(); } int i = type.indexOf(';'); if(i>=0){ setHeader("Content-Type", type); contentType = type.substring(0, i).trim(); i=type.lastIndexOf('='); if(i>=0){ setCharacterEncoding(type.substring(i+1).trim()); } } else { setHeader("Content-Type", type+";charset="+getCharacterEncoding()); contentType = type; } }
public PrintWriter getWriter() throws IOException { if (null != this.outputStream) { throw new IllegalStateException(); } if (this.outputWriter == null) { this.outputWriter = new StringWriter(getBufferSize()); printWriter = new PrintWriter(outputWriter); } return printWriter; }
public void setIntHeader(String name, int value) { setHeader(name, String.valueOf(value)); }
public void resetBuffer() { if(isCommitted()){ throw new IllegalStateException(); } this.servletOutputStream = null; this.outputStream = null; this.printWriter = null; this.outputWriter = null; }
public String encodeUrl(String url) { return encodeURL(url); }
public void setContentType(String type) { if(null == type){ throw new NullPointerException(); } int i = type.indexOf(';'); if(i>=0){ setHeader("Content-Type", type); contentType = type.substring(0, i).trim(); i=type.lastIndexOf('='); if(i>=0){ setCharacterEncoding(type.substring(i+1).trim()); } } else { setHeader("Content-Type", type+";charset="+getCharacterEncoding()); contentType = type; } }
public void reset() { if(isCommitted()){ throw new IllegalStateException(); } resetBuffer(); }
public PrintWriter getWriter() throws IOException { if (null != this.outputStream) { throw new IllegalStateException(); } if (this.outputWriter == null) { this.outputWriter = new StringWriter(getBufferSize()); printWriter = new PrintWriter(outputWriter); } return printWriter; }
public void setIntHeader(String name, int value) { setHeader(name, String.valueOf(value)); }
public void resetBuffer() { if(isCommitted()){ throw new IllegalStateException(); } this.servletOutputStream = null; this.outputStream = null; this.printWriter = null; this.outputWriter = null; }
public String encodeUrl(String url) { return encodeURL(url); }
public void addIntHeader(String name, int value) { addHeader(name, String.valueOf(value)); }
public ServletOutputStream getOutputStream() throws IOException { if (null != this.outputWriter) { throw new IllegalStateException(); } if (this.outputStream == null) { this.outputStream = new ByteArrayOutputStream(getBufferSize()); servletOutputStream = new ServletOutputStream(){ @Override public void write(int b) throws IOException { StagingHttpResponse.this.outputStream.write(b); } }; } return servletOutputStream; }
public void setDateHeader(String name, long date) { // TODO - locale support ? setHeader(name, new Date(date).toString()); }
@Override public void addCookie(Cookie cookie) { super.addCookie(cookie); cookies.add(cookie); }
public String encodeRedirectUrl(String url) { return encodeRedirectURL(url); }