Class NodeMessageBodyWriter

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter<com.fasterxml.jackson.databind.node.ObjectNode>

    @Provider
    @Produces("application/json")
    public class NodeMessageBodyWriter
    extends Object
    implements javax.ws.rs.ext.MessageBodyWriter<com.fasterxml.jackson.databind.node.ObjectNode>
    • Constructor Detail

      • NodeMessageBodyWriter

        public NodeMessageBodyWriter()
    • Method Detail

      • trimCharSet

        public String trimCharSet​(javax.ws.rs.core.MediaType mediaType)
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   javax.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<com.fasterxml.jackson.databind.node.ObjectNode>
      • getSize

        public long getSize​(com.fasterxml.jackson.databind.node.ObjectNode t,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface javax.ws.rs.ext.MessageBodyWriter<com.fasterxml.jackson.databind.node.ObjectNode>
      • writeTo

        public void writeTo​(com.fasterxml.jackson.databind.node.ObjectNode node,
                            Class<?> arg1,
                            Type arg2,
                            Annotation[] arg3,
                            javax.ws.rs.core.MediaType arg4,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> arg5,
                            OutputStream out)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<com.fasterxml.jackson.databind.node.ObjectNode>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException