com.abubusoft.kripton.persistence.JacksonWrapperSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kripton-core Show documentation
Show all versions of kripton-core Show documentation
Kripton Persistence Library - core module
package com.abubusoft.kripton.persistence;
import java.io.IOException;
import com.abubusoft.kripton.BinderType;
import com.abubusoft.kripton.exception.KriptonRuntimeException;
import com.fasterxml.jackson.core.JsonGenerator;
public class JacksonWrapperSerializer implements SerializerWrapper {
public JsonGenerator jacksonGenerator;
public JacksonWrapperSerializer(JsonGenerator jacksonSerializer, BinderType supportedFormat) {
this.jacksonGenerator = jacksonSerializer;
}
@Override
public void close() {
try {
if (!jacksonGenerator.isClosed())
jacksonGenerator.close();
} catch (IOException e) {
e.printStackTrace();
throw(new KriptonRuntimeException(e));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy