public void setContentType(String contentType) { webPageCache.setContentType(contentType); }
public ServletOutputStream getOutputStream() throws IOException { checkWriterOrOutputStream(); outputStream = new FileOutputStream(webPageCache.getContent()); return new CacheOutputStream(outputStream); }
public String getContentType() { return webPageCache.getContentType(); }
private void checkWriterOrOutputStream() throws IOException { if (webPageCache.getContent().length() > 0) { throw new RuntimeException( "the response already opened" + webPageCache.getContent().length()); } }