private InputStream getRequestStream(ResourceRequest request) throws IOException { if (request.getMethod().equals("POST")) { return request.getPortletInputStream(); } else if (request.getMethod().equals("GET")) { return createInputStream(request); } else { throw new IOException("Invalid request method, only POST and GET is supported"); } }
/** * The default behavior of this method is to call * <code>getPortletInputStream()</code> on the wrapped request object. */ public InputStream getPortletInputStream() throws IOException { return request.getPortletInputStream(); }
public InputStream getPortletInputStream() throws IOException { return wrappedResourceRequest.getPortletInputStream(); }
public InputStream getPortletInputStream() throws IOException { return resourceRequest.getPortletInputStream(); }
public InputStream getPortletInputStream() throws IOException { return resourceRequest.getPortletInputStream(); }
public InputStream getPortletInputStream() throws IOException { return wrappedResourceRequest.getPortletInputStream(); }
@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"); }