Class ResponseWriter

java.lang.Object
com.cksource.ckfinder.http.response.writer.ResponseWriter
Direct Known Subclasses:
JsonResponseWriter, StreamResponseWriter

public abstract class ResponseWriter extends Object
Base class for response writers.
  • Constructor Details

    • ResponseWriter

      public ResponseWriter()
  • Method Details

    • canWrite

      public abstract boolean canWrite(Class<?> clazz)
      Checks if this writer is able to write response body of given class.
      Parameters:
      clazz - response body class
      Returns:
      true if this writer is able to handle response body of given class
    • write

      public abstract void write(ResponseEntity responseEntity, HttpServletResponse response) throws Exception
      Writes HTTP response to given HttpServletResponse instance.
      Parameters:
      responseEntity - object that holds info about the response
      response - current servlet response
      Throws:
      Exception - in case of any processing exception
    • writeHeaders

      protected void writeHeaders(HttpHeaders headers, HttpServletResponse response)
      Sets HTTP headers for current servlet response.
      Parameters:
      headers - headers to set
      response - curremt servlet response