Class PortletResponseUtil
Object
com.liferay.portal.kernel.portlet.PortletResponseUtil
- Author:
- Brian Wing Shun Chan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes) static voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes, String contentType) static voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes, String contentType, String contentDispositionType) static voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes, String contentType, String contentDispositionType, String cacheControlValue) static voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream) static voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream, int contentLength, String contentType) static voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream, int contentLength, String contentType, String contentDispositionType) static voidsendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream, String contentType) protected static voidsetContentLength(ResourceResponse response, long contentLength) protected static voidsetHeaders(PortletRequest portletRequest, MimeResponse mimeResponse, String cacheControlValue, String contentDispositionType, String contentType, String fileName) static voidwrite(MimeResponse mimeResponse, byte[] bytes) static voidwrite(MimeResponse mimeResponse, byte[][] bytesArray) static voidwrite(MimeResponse mimeResponse, byte[] bytes, int offset, int contentLength) static voidwrite(MimeResponse mimeResponse, File file) static voidwrite(MimeResponse mimeResponse, InputStream inputStream) static voidwrite(MimeResponse mimeResponse, InputStream inputStream, int contentLength) static voidwrite(MimeResponse mimeResponse, String s)
-
Constructor Details
-
PortletResponseUtil
public PortletResponseUtil()
-
-
Method Details
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes, String contentType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes, String contentType, String contentDispositionType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, byte[] bytes, String contentType, String contentDispositionType, String cacheControlValue) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream, int contentLength, String contentType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream, int contentLength, String contentType, String contentDispositionType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(PortletRequest portletRequest, MimeResponse mimeResponse, String fileName, InputStream inputStream, String contentType) throws IOException - Throws:
IOException
-
write
- Throws:
IOException
-
write
public static void write(MimeResponse mimeResponse, byte[] bytes, int offset, int contentLength) throws IOException - Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
write
public static void write(MimeResponse mimeResponse, InputStream inputStream, int contentLength) throws IOException - Throws:
IOException
-
write
- Throws:
IOException
-
setContentLength
-
setHeaders
protected static void setHeaders(PortletRequest portletRequest, MimeResponse mimeResponse, String cacheControlValue, String contentDispositionType, String contentType, String fileName)
-