1 15 package org.apache.tapestry.portlet; 16 17 import java.io.IOException ; 18 import java.io.PrintWriter ; 19 20 import javax.portlet.RenderResponse; 21 22 import org.apache.hivemind.util.Defense; 23 import org.apache.tapestry.util.ContentType; 24 25 32 public class RenderWebResponse extends PortletWebResponse 33 { 34 private final RenderResponse _renderResponse; 35 36 public RenderWebResponse(RenderResponse renderResponse) 37 { 38 super(renderResponse); 39 40 _renderResponse = renderResponse; 41 } 42 43 public void reset() 44 { 45 _renderResponse.reset(); 46 } 47 48 public PrintWriter getPrintWriter(ContentType contentType) throws IOException 49 { 50 Defense.notNull(contentType, "contentType"); 51 52 _renderResponse.setContentType(contentType.toString()); 53 54 return _renderResponse.getWriter(); 55 } 56 57 public String getNamespace() 58 { 59 return _renderResponse.getNamespace(); 60 } 61 } | Popular Tags |