Class ResponseWriter
java.lang.Object
com.cksource.ckfinder.http.response.writer.ResponseWriter
- Direct Known Subclasses:
JsonResponseWriter
,StreamResponseWriter
Base class for response writers.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Checks if this writer is able to write response body of given class.abstract void
write
(ResponseEntity responseEntity, HttpServletResponse response) Writes HTTP response to givenHttpServletResponse
instance.protected void
writeHeaders
(HttpHeaders headers, HttpServletResponse response) Sets HTTP headers for current servlet response.
-
Constructor Details
-
ResponseWriter
public ResponseWriter()
-
-
Method Details
-
canWrite
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 givenHttpServletResponse
instance.- Parameters:
responseEntity
- object that holds info about the responseresponse
- current servlet response- Throws:
Exception
- in case of any processing exception
-
writeHeaders
Sets HTTP headers for current servlet response.- Parameters:
headers
- headers to setresponse
- curremt servlet response
-