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