|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.api.jaxrs.providers.AbstractProvider
public class AbstractProvider
Abstract class providing helper methods for JAX-RS readers & writers.
Constructor Summary | |
---|---|
AbstractProvider()
|
Method Summary | ||
---|---|---|
protected java.io.PrintWriter |
createWriter(java.io.OutputStream outputStream)
Create a UTF-8 print-writer. |
|
protected
|
getTypeArgument(java.lang.reflect.Type type,
int index)
Determine the class argument of a parameterized type. |
|
protected boolean |
isCollectionOfType(java.lang.Class<?> clazz,
java.lang.reflect.Type type)
Determine if a type is a collection of the specified class. |
|
protected boolean |
isMapOfType(java.lang.Class<?> clazz,
java.lang.reflect.Type type)
Determine if a type is a collection of the specified class. |
|
protected Json |
readJson(javax.ws.rs.core.MediaType mediaType,
java.io.InputStream entityStream)
Read the request body into a JSON object. |
|
protected java.lang.String |
readString(javax.ws.rs.core.MediaType mediaType,
java.io.InputStream entityStream)
Read the request body into a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractProvider()
Method Detail |
---|
protected boolean isCollectionOfType(java.lang.Class<?> clazz, java.lang.reflect.Type type)
clazz
- The parameterized type of the collection.type
- The type to check.
protected boolean isMapOfType(java.lang.Class<?> clazz, java.lang.reflect.Type type)
clazz
- The parameterized type of the collection.type
- The type to check.
protected java.lang.String readString(javax.ws.rs.core.MediaType mediaType, java.io.InputStream entityStream) throws java.io.IOException
mediaType
- The content type of the request.entityStream
- The request input stream.
java.io.IOException
- If reading from the input stream fails.protected Json readJson(javax.ws.rs.core.MediaType mediaType, java.io.InputStream entityStream) throws java.io.IOException
mediaType
- The content type of the request.entityStream
- The request input stream.
java.io.IOException
- If reading from the input stream fails.protected java.io.PrintWriter createWriter(java.io.OutputStream outputStream)
outputStream
- The output stream the writer will write to.
protected <T> java.lang.Class<T> getTypeArgument(java.lang.reflect.Type type, int index)
T
- The type of the class argument.type
- The parameterized type.index
- The index of the argument.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |