Class JSONProvider

java.lang.Object
org.apache.hadoop.lib.wsrs.JSONProvider
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>

@Provider @Produces("application/json; charset=utf-8") @Private public class JSONProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>
  • Constructor Details

    • JSONProvider

      public JSONProvider()
  • Method Details

    • isWriteable

      public boolean isWriteable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>
    • getSize

      public long getSize(org.json.simple.JSONStreamAware jsonStreamAware, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
      Specified by:
      getSize in interface javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>
    • writeTo

      public void writeTo(org.json.simple.JSONStreamAware jsonStreamAware, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> stringObjectMultivaluedMap, OutputStream outputStream) throws IOException, javax.ws.rs.WebApplicationException
      Specified by:
      writeTo in interface javax.ws.rs.ext.MessageBodyWriter<org.json.simple.JSONStreamAware>
      Throws:
      IOException
      javax.ws.rs.WebApplicationException