Interface Response

  • All Known Subinterfaces:
    RedirectResponse

    public interface Response
    Represents a server response.
    Version:
    $Id: 4d1594bc515bf1741850ce3d759c27a0bd06e490 $
    • Method Detail

      • getOutputStream

        OutputStream getOutputStream()
                              throws IOException
        Returns an OutputStream suitable for writing binary data in the response.
        Returns:
        the binary OutputStream for the response, or null if the response does not allow writing data
        Throws:
        IOException - if an output exception occurred
      • setContentLength

        void setContentLength​(int length)
        Sets the length of the content body in the response. If this length is not relevant to the type of connection, it will simply be ignored.
        Parameters:
        length - an integer specifying the length of the content being returned to the client
      • setContentType

        void setContentType​(String mimeType)
        Sets the content type of the response being sent to the client, as a MIME type string. For example, text/html. If the MIME type is not relevant to the type of connection, it will simply be ignored.
        Parameters:
        mimeType - the MIME type for this response, according to the RFC 2045.