Package io.awspring.cloud.s3
Class Jackson2JsonS3ObjectConverter
java.lang.Object
io.awspring.cloud.s3.Jackson2JsonS3ObjectConverter
- All Implemented Interfaces:
S3ObjectConverter
Jackson based implementation of
S3ObjectConverter. Serializes/deserializes objects to/from JSON.- Since:
- 3.0
- Author:
- Maciej Walkowiak
-
Constructor Summary
ConstructorsConstructorDescriptionJackson2JsonS3ObjectConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionSupported content type.<T> Tread(InputStream is, Class<T> clazz) Reads S3 object from the input stream into a Java object.<T> software.amazon.awssdk.core.sync.RequestBodywrite(T object) Converts object into aRequestBody.
-
Constructor Details
-
Jackson2JsonS3ObjectConverter
public Jackson2JsonS3ObjectConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
write
public <T> software.amazon.awssdk.core.sync.RequestBody write(T object) Description copied from interface:S3ObjectConverterConverts object into aRequestBody.- Specified by:
writein interfaceS3ObjectConverter- Type Parameters:
T- - type of the object- Parameters:
object- - the object to serialize- Returns:
- the request body
-
read
Description copied from interface:S3ObjectConverterReads S3 object from the input stream into a Java object.- Specified by:
readin interfaceS3ObjectConverter- Type Parameters:
T- - the the type of the object- Parameters:
is- - the input streamclazz- - the class of the object- Returns:
- deserialized object
-
contentType
Description copied from interface:S3ObjectConverterSupported content type.- Specified by:
contentTypein interfaceS3ObjectConverter- Returns:
- the content type
-