Class ServletResponseUtil

Object
com.liferay.portal.kernel.servlet.ServletResponseUtil

public class ServletResponseUtil extends Object
Author:
Brian Wing Shun Chan, Shuyang Zhou
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
     
    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
    write(javax.servlet.http.HttpServletResponse httpServletResponse, File file)
     
    static void
    write(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream)
     
    static void
    write(javax.servlet.http.HttpServletResponse httpServletResponse, InputStream inputStream, long contentLength)
     
    static void
    write(javax.servlet.http.HttpServletResponse httpServletResponse, String s)
     
    static void
    write(javax.servlet.http.HttpServletResponse httpServletResponse, ByteBuffer byteBuffer)
     
    static void
    write(javax.servlet.http.HttpServletResponse httpServletResponse, CharBuffer charBuffer)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServletResponseUtil

      public ServletResponseUtil()
  • Method Details

    • isClientAbortException

      public static boolean isClientAbortException(IOException ioException)
    • 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

      protected static void setHeaders(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, String contentType, String contentDispositionType)
    • setHeaders

      protected static void setHeaders(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.http.HttpServletResponse httpServletResponse, String fileName, String contentType, String contentDispositionType, Range range)