T - the type supported by this providerpublic abstract class CharacterMessageBodyProvider<T> extends MessageBodyProvider<T>
| Constructor and Description |
|---|
CharacterMessageBodyProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected Charset |
defaultCharset()
Returns the default charset to be used by this provider if no other charset is specified.
|
T |
readFrom(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
InputStream entityStream) |
protected abstract T |
readFrom(Class<T> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
Reader reader)
Reads the HTTP entity from a
Reader. |
void |
writeTo(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
protected abstract void |
writeTo(T t,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
Writer writer)
Writes the HTTP entity to a
Writer. |
isReadable, isSupportedType, isWriteableprotected abstract T readFrom(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, Reader reader) throws IOException
Reader. This is the character stream equivalent to
MessageBodyReader.readFrom(Class, Type, Annotation[], MediaType, MultivaluedMap, InputStream).type - the type that is to be read.genericType - the type of instance to be produced.annotations - an array of the annotations on the declaration of the
artifact that will be initialized with the produced instance.mediaType - the media type of the HTTP entity.httpHeaders - the read-only HTTP headers associated with HTTP entity.reader - the Reader for the HTTP entity. The implementation should NOT close this reader!IOExceptionMessageBodyReader.readFrom(Class, Type, Annotation[], MediaType, MultivaluedMap, InputStream)protected abstract void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, Writer writer) throws IOException
Writer. This is the character stream equivalent to
MessageBodyWriter.writeTo(Object, Class, Type, Annotation[], MediaType, MultivaluedMap, OutputStream).t - the instance to write.type - the class of instance that is to be written.genericType - the type of instance to be written.annotations - an array of the annotations attached to the message entity instance.mediaType - the media type of the HTTP entity.httpHeaders - a mutable map of the HTTP message headers.writer - the Writer for the HTTP entity. The implementation should NOT close this writer!IOExceptionMessageBodyWriter.writeTo(Object, Class, Type, Annotation[], MediaType, MultivaluedMap, OutputStream)public final T readFrom(Class<T> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream) throws IOException
IOExceptionpublic final void writeTo(T t, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException
IOExceptionprotected Charset defaultCharset()
StandardCharsets.UTF_8.Copyright © 2018–2019. All rights reserved.