public class JSONResponseWriter extends AbstractResponseWriter<com.fasterxml.jackson.databind.JsonNode>
Constructor and Description |
---|
JSONResponseWriter() |
Modifier and Type | Method and Description |
---|---|
MediaType |
getContentType()
Get the current contentType
|
void |
setContentType(MediaType contentType)
Set the contentType
|
boolean |
supportsGZip(com.fasterxml.jackson.databind.JsonNode t)
Check if GZip is supported by this writer
|
void |
write(com.fasterxml.jackson.databind.JsonNode t,
OutputStream out,
ResponseProxy responseProxy)
Write object t to
OutputStream out |
getEncodedContentType, getEncoder, isSetContentType
public void write(com.fasterxml.jackson.databind.JsonNode t, OutputStream out, ResponseProxy responseProxy) throws IOException
ResponseWriter
OutputStream
outt
- Object to writeout
- OutputStream
to be written toresponseProxy
- ResponseProxy
giving access to header and content length settersIOException
- If an error occurs during writingpublic MediaType getContentType()
ResponseWriter
getContentType
in interface ResponseWriter<com.fasterxml.jackson.databind.JsonNode>
getContentType
in class AbstractResponseWriter<com.fasterxml.jackson.databind.JsonNode>
public void setContentType(MediaType contentType)
ResponseWriter
setContentType
in interface ResponseWriter<com.fasterxml.jackson.databind.JsonNode>
setContentType
in class AbstractResponseWriter<com.fasterxml.jackson.databind.JsonNode>
contentType
- to setpublic boolean supportsGZip(com.fasterxml.jackson.databind.JsonNode t)
ResponseWriter
t
- Object to writetrue
, if GZip is supportedCopyright © 2012-2015 52north.org. All Rights Reserved.