Class ServletResponseUtil
Object
com.liferay.portal.kernel.servlet.ServletResponseUtil
- Author:
- Brian Wing Shun Chan, Shuyang Zhou
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isClientAbortException
(IOException ioException) static void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes) static void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes, String contentType) static void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, byte[] bytes, String contentType, String contentDispositionType) static void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream) static void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType) static void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType, String contentDispositionType) static void
sendFile
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, String contentType) static void
sendFileWithRangeHeader
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, InputStream inputStream, long contentLength, String contentType) protected static void
setContentLength
(javax.servlet.http.HttpServletResponse httpServletResponse, long contentLength) protected static void
setHeaders
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, String contentType, String contentDispositionType) protected static void
setHeaders
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, String contentType, String contentDispositionType, Range range) static void
write
(javax.servlet.http.HttpServletResponse httpServletResponse, byte[] bytes) static void
write
(javax.servlet.http.HttpServletResponse httpServletResponse, byte[][] bytesArray) static void
write
(javax.servlet.http.HttpServletResponse httpServletResponse, byte[] bytes, int offset, int contentLength) static void
write
(javax.servlet.http.HttpServletResponse httpServletResponse, BufferCacheServletResponse bufferCacheServletResponse) static void
static void
write
(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream) static void
write
(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream, long contentLength) static void
static void
write
(javax.servlet.http.HttpServletResponse httpServletResponse, ByteBuffer byteBuffer) static void
write
(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
-