Package systems.dmx.webservice.provider
Class StringCollectionProvider
- java.lang.Object
-
- systems.dmx.webservice.provider.StringCollectionProvider
-
- All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<List<String>>,javax.ws.rs.ext.MessageBodyWriter<Collection<String>>
@Provider public class StringCollectionProvider extends Object implements javax.ws.rs.ext.MessageBodyReader<List<String>>, javax.ws.rs.ext.MessageBodyWriter<Collection<String>>
-
-
Constructor Summary
Constructors Constructor Description StringCollectionProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetSize(Collection<String> strings, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)booleanisWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)List<String>readFrom(Class<List<String>> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)voidwriteTo(Collection<String> strings, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream)
-
-
-
Method Detail
-
isReadable
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
-
readFrom
public List<String> readFrom(Class<List<String>> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
readFromin interfacejavax.ws.rs.ext.MessageBodyReader<List<String>>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
isWriteable
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
isWriteablein interfacejavax.ws.rs.ext.MessageBodyWriter<Collection<String>>
-
getSize
public long getSize(Collection<String> strings, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
- Specified by:
getSizein interfacejavax.ws.rs.ext.MessageBodyWriter<Collection<String>>
-
writeTo
public void writeTo(Collection<String> strings, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
- Specified by:
writeToin interfacejavax.ws.rs.ext.MessageBodyWriter<Collection<String>>- Throws:
IOExceptionjavax.ws.rs.WebApplicationException
-
-