Class JsonRecordSetWriter

  • All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyWriter<RecordSet>

    @Provider
    public class JsonRecordSetWriter
    extends Object
    implements javax.ws.rs.ext.MessageBodyWriter<RecordSet>
    Manage JSON Marshalling for RecordSet objects
    Since:
    5.7
    Author:
    Tiry
    • Field Detail

      • log

        protected static Log log
    • Constructor Detail

      • JsonRecordSetWriter

        public JsonRecordSetWriter()
    • Method Detail

      • 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<RecordSet>
      • getSize

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

        public void writeTo​(RecordSet records,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            javax.ws.rs.core.MediaType mediaType,
                            javax.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream out)
                     throws IOException,
                            javax.ws.rs.WebApplicationException
        Specified by:
        writeTo in interface javax.ws.rs.ext.MessageBodyWriter<RecordSet>
        Throws:
        IOException
        javax.ws.rs.WebApplicationException