Interface ILcdResponse

All Known Implementing Classes:
TLcdHttpServletResponseWrapper

public interface ILcdResponse
An interface for server responses.

This interface must not be implemented by users. It may be subject to change.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Flushes all pending data being written for this response.
    Returns an OutputStream to which the server can write its response.
    Returns a PrintWriter to which the server can write its response.
    void
    setContentLength(int aContentLength)
    Specifies the size of the data returned by this response.
    void
    setContentType(String aContentType)
    Sets the content type (MIME type) of the response.
    void
    setDateHeader(String aName, long aValue)
    Sets a response header with the given name and date-value.
    void
    setHeader(String aName, String aValue)
    Sets a response header with the given name and value.
    void
    setStatus(int aStatus)
    Sets the HTTP status code for this response.
  • Method Details

    • getOutputStream

      OutputStream getOutputStream() throws IOException
      Returns an OutputStream to which the server can write its response.
      Returns:
      An OutputStream
      Throws:
      IOException - if the output stream cannot be retrieved
    • getWriter

      PrintWriter getWriter() throws IOException
      Returns a PrintWriter to which the server can write its response.
      Returns:
      A PrintWriter
      Throws:
      IOException - if the PrintWriter cannot be created.
    • setContentType

      void setContentType(String aContentType)
      Sets the content type (MIME type) of the response.
      Parameters:
      aContentType - A MIME type, e.g. "text/xml".
    • setContentLength

      void setContentLength(int aContentLength)
      Specifies the size of the data returned by this response.
      Parameters:
      aContentLength - The data size of the response.
    • flush

      void flush() throws IOException
      Flushes all pending data being written for this response.
      Throws:
      IOException - if the flush operation fails.
    • setDateHeader

      void setDateHeader(String aName, long aValue)
      Sets a response header with the given name and date-value. The date is specified in terms of milliseconds since the epoch. If the header had already been set, the new value overwrites the previous one. The containsHeader method can be used to test for the presence of a header before setting its value.
      Parameters:
      aName - the name of the header to set
      aValue - the assigned date value
      Since:
      2017.0
    • setHeader

      void setHeader(String aName, String aValue)
      Sets a response header with the given name and value. If the header had already been set, the new value overwrites the previous one.
      Parameters:
      aName - the header name
      aValue - the header value
      Since:
      2017.0
    • setStatus

      void setStatus(int aStatus)
      Sets the HTTP status code for this response.
      Parameters:
      aStatus - the HTTP status code for this response.
      Since:
      2017.0