All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.abubusoft.kripton.persistence.JacksonWrapperSerializer Maven / Gradle / Ivy

There is a newer version: 8.2.0-rc.4
Show newest version
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