Class ServletResponseUtil
Object
com.liferay.portal.kernel.servlet.ServletResponseUtil
- Author:
- Brian Wing Shun Chan, Shuyang Zhou
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisClientAbortException(IOException ioException) static voidsendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes) static voidsendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes, String contentType) static voidsendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes, String contentType, String contentDispositionType) static voidsendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream) static voidsendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType) static voidsendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType, String contentDispositionType) static voidsendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, String contentType) static voidsendFileWithRangeHeader(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType) protected static voidsetContentLength(javax.servlet.http.HttpServletResponse httpServletResponse, long contentLength) protected static voidsetHeaders(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, String contentType, String contentDispositionType) protected static voidsetHeaders(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, String contentType, String contentDispositionType, Range range) static voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, byte[] bytes) static voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, byte[][] bytesArray) static voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, byte[] bytes, int offset, int contentLength) static voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, BufferCacheServletResponse bufferCacheServletResponse) static voidstatic voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream) static voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream, long contentLength) static voidstatic voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, ByteBuffer byteBuffer) static voidwrite(javax.servlet.http.HttpServletResponse httpServletResponse, CharBuffer charBuffer)
-
Constructor Details
-
ServletResponseUtil
public ServletResponseUtil()
-
-
Method Details
-
isClientAbortException
-
sendFile
public static void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes, String contentType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes, String contentType, String contentDispositionType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType, String contentDispositionType) throws IOException - Throws:
IOException
-
sendFile
public static void sendFile(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, String contentType) throws IOException - Throws:
IOException
-
sendFileWithRangeHeader
public static void sendFileWithRangeHeader(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, BufferCacheServletResponse bufferCacheServletResponse) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, byte[] bytes) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, byte[] bytes, int offset, int contentLength) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, byte[][] bytesArray) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, ByteBuffer byteBuffer) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, CharBuffer charBuffer) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, File file) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream, long contentLength) throws IOException - Throws:
IOException
-
write
public static void write(javax.servlet.http.HttpServletResponse httpServletResponse, String s) throws IOException - Throws:
IOException
-
setContentLength
protected static void setContentLength(javax.servlet.http.HttpServletResponse httpServletResponse, long contentLength) -
setHeaders
-
setHeaders
-