@Provider @Consumes(value="application/json") @Produces(value="application/json") public class GsonMessageBodyProvider extends Object implements javax.ws.rs.ext.MessageBodyWriter<Object>, javax.ws.rs.ext.MessageBodyReader<Object>
Constructor and Description |
---|
GsonMessageBodyProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getSize(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
Object |
readFrom(Class<Object> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
void |
writeTo(Object t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public boolean isReadable(@Nullable Class<?> type, @Nonnull Type genericType, @Nullable Annotation[] annotations, @Nullable javax.ws.rs.core.MediaType mediaType)
isReadable
in interface javax.ws.rs.ext.MessageBodyReader<Object>
public boolean isWriteable(@Nullable Class<?> type, @Nonnull Type genericType, @Nullable Annotation[] annotations, @Nullable javax.ws.rs.core.MediaType mediaType)
isWriteable
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
public long getSize(@Nullable Object t, @Nullable Class<?> type, @Nonnull Type genericType, @Nullable Annotation[] annotations, @Nullable javax.ws.rs.core.MediaType mediaType)
getSize
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
@Nullable public Object readFrom(@Nullable Class<Object> type, @Nonnull Type genericType, @Nullable Annotation[] annotations, @Nullable javax.ws.rs.core.MediaType mediaType, @Nullable javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, @Nonnull InputStream entityStream) throws IOException
readFrom
in interface javax.ws.rs.ext.MessageBodyReader<Object>
IOException
public void writeTo(@Nullable Object t, @Nullable Class<?> type, @Nonnull Type genericType, @Nullable Annotation[] annotations, @Nullable javax.ws.rs.core.MediaType mediaType, @Nullable javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, @Nonnull OutputStream entityStream) throws IOException
writeTo
in interface javax.ws.rs.ext.MessageBodyWriter<Object>
IOException
Copyright © 2021 SAP SE. All rights reserved.