org.wso2.carbon.mdm.services.android.common

## Class GsonMessageBodyHandler

- java.lang.Object
- - org.wso2.carbon.mdm.services.android.common.GsonMessageBodyHandler

- All Implemented Interfaces:
    javax.ws.rs.ext.MessageBodyReader<Object>, javax.ws.rs.ext.MessageBodyWriter<Object>

      @Provider
      public class GsonMessageBodyHandler
      extends Object
      implements javax.ws.rs.ext.MessageBodyWriter<Object>, javax.ws.rs.ext.MessageBodyReader<Object>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GsonMessageBodyHandler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getSize(Object o, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)`
    `boolean` | `isReadable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)`
    `boolean` | `isWriteable(Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)`
    `Object` | `readFrom(Class<Object> objectClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> stringStringMultivaluedMap, InputStream entityStream)`
    `void` | `writeTo(Object object, Class<?> aClass, Type type, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> stringObjectMultivaluedMap, OutputStream entityStream)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GsonMessageBodyHandler

          public GsonMessageBodyHandler()

  - ### Method Detail

    - #### isReadable

          public boolean isReadable(Class<?> aClass,
                           Type type,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)

      Specified by:
        `isReadable` in interface `javax.ws.rs.ext.MessageBodyReader<Object>`

    - #### readFrom

          public Object readFrom(Class<Object> objectClass,
                        Type type,
                        Annotation[] annotations,
                        javax.ws.rs.core.MediaType mediaType,
                        javax.ws.rs.core.MultivaluedMap<String,String> stringStringMultivaluedMap,
                        InputStream entityStream)
                          throws IOException,
                                 javax.ws.rs.WebApplicationException

      Specified by:
        `readFrom` in interface `javax.ws.rs.ext.MessageBodyReader<Object>`
      Throws:
        `IOException`
        `javax.ws.rs.WebApplicationException`

    - #### 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<Object>`

    - #### getSize

          public long getSize(Object o,
                     Class<?> aClass,
                     Type type,
                     Annotation[] annotations,
                     javax.ws.rs.core.MediaType mediaType)

      Specified by:
        `getSize` in interface `javax.ws.rs.ext.MessageBodyWriter<Object>`

    - #### writeTo

          public void writeTo(Object object,
                     Class<?> aClass,
                     Type type,
                     Annotation[] annotations,
                     javax.ws.rs.core.MediaType mediaType,
                     javax.ws.rs.core.MultivaluedMap<String,Object> stringObjectMultivaluedMap,
                     OutputStream entityStream)
                       throws IOException,
                              javax.ws.rs.WebApplicationException

      Specified by:
        `writeTo` in interface `javax.ws.rs.ext.MessageBodyWriter<Object>`
      Throws:
        `IOException`
        `javax.ws.rs.WebApplicationException`

Copyright © 2017 WSO2. All rights reserved.