public class JacksonSerializerWrapper extends Object implements ObjectSerializer
| Constructor and Description |
|---|
JacksonSerializerWrapper() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
readValue(File file,
Class<T> valueType)
Deserializes an object that has been previously converted into a textual format
|
<T> T |
readValue(InputStream inputStream,
Class<T> valueType)
Deserializes an object that has been previously converted into a textual format
|
<T> T |
readValue(String content,
Class<T> valueType)
Deserializes an object that has been previously converted into a textual format
|
String |
writeValueAsString(Object object)
Converts an object into a textual representation, preserving all the object properties.
|
void |
writeValueOnFile(Object object,
String filePath)
Converts an object into a textual representation, preserving all the object properties,
and write this String into a file.
|
void |
writeValueOnGzipFile(Object object,
String filePath)
Converts an object into a textual representation, preserving all the object properties,
and write this String into a GZip file.
|
public <T> T readValue(String content, Class<T> valueType) throws IOException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException
ObjectSerializerreadValue in interface ObjectSerializercontent - the object in its textual formatvalueType - the class of the object to be deserializedIOExceptioncom.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionpublic <T> T readValue(File file, Class<T> valueType) throws IOException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException
ObjectSerializerreadValue in interface ObjectSerializerfile - the file from which the serialized format must be readvalueType - the class of the object to be deserializedIOExceptioncom.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionpublic <T> T readValue(InputStream inputStream, Class<T> valueType) throws IOException, com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException
ObjectSerializerreadValue in interface ObjectSerializerinputStream - the input stream from which the serialized format must be readvalueType - the class of the object to be deserializedIOExceptioncom.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionpublic String writeValueAsString(Object object) throws com.fasterxml.jackson.core.JsonProcessingException
ObjectSerializerwriteValueAsString in interface ObjectSerializerobject - the object to be serializedobjectcom.fasterxml.jackson.core.JsonProcessingExceptionpublic void writeValueOnFile(Object object, String filePath) throws IOException
ObjectSerializerwriteValueOnFile in interface ObjectSerializerobject - the object to be serializedfilePath - the path of the file where object must be serializedIOExceptionpublic void writeValueOnGzipFile(Object object, String filePath) throws IOException
ObjectSerializerwriteValueOnGzipFile in interface ObjectSerializerobject - the object to be serializedfilePath - the path of the file where object must be serializedIOExceptionCopyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.