@Override public String getContentType() { try { return ((ResourceRequest) getRequest()).getContentType(); } catch (ClassCastException e) { throw new IllegalStateException( "Content type only available for ResourceRequests"); } }
/** * The default behavior of this method is to call * <code>getContentType()</code> on the wrapped request object. */ public String getContentType() { return request.getContentType(); }
public String getContentType() { return resourceRequest.getContentType(); }
public String getContentType() { return resourceRequest.getContentType(); }
@Override public void serveResource(ResourceRequest request, ResourceResponse response) throws PortletException, IOException { contentType = request.getContentType(); InputStream in = request.getPortletInputStream(); bytes = new String(IOTools.getBytes(in), "UTF-8"); }