Interface HttpBodyConverter
-
- All Known Implementing Classes:
JacksonBodyConverter,StringConverter
public interface HttpBodyConverterAn object mapper is used to serialize and deserialize a Java object to and from a String, byte[] or InputStream.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceHttpBodyConverter.DeserializationContextstatic interfaceHttpBodyConverter.SerializationContext
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> booleancanRead(HttpBodyConverter.DeserializationContext context, java.lang.Class<T> type)booleancanWrite(HttpBodyConverter.SerializationContext context)java.util.Collection<MediaType>getSupportedMediaTypes()<T> Tread(HttpBodyConverter.DeserializationContext context, java.lang.Class<T> type)default booleansupportsMediaType(MediaType mediaType)Checks if thisHttpBodyConvertersupports the provided media type.byte[]write(HttpBodyConverter.SerializationContext context)
-
-
-
Method Detail
-
canRead
<T> boolean canRead(HttpBodyConverter.DeserializationContext context, java.lang.Class<T> type)
-
read
<T> T read(HttpBodyConverter.DeserializationContext context, java.lang.Class<T> type)
-
canWrite
boolean canWrite(HttpBodyConverter.SerializationContext context)
-
write
byte[] write(HttpBodyConverter.SerializationContext context)
-
getSupportedMediaTypes
java.util.Collection<MediaType> getSupportedMediaTypes()
-
supportsMediaType
default boolean supportsMediaType(MediaType mediaType)
Checks if thisHttpBodyConvertersupports the provided media type. Used for both reading and writing.- Parameters:
mediaType- to convert from or into- Returns:
trueif mediaType is null or is compatible, otherwisefalse
-
-