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

com.agimatec.sql.meta.persistence.SerializerPersistencer Maven / Gradle / Ivy

There is a newer version: 2.5.27
Show newest version
package com.agimatec.sql.meta.persistence;

import java.io.*;

/**
 * Description: 
* User: roman.stumm
* Date: 27.04.2007
* Time: 17:39:51
* Copyright: Agimatec GmbH */ public class SerializerPersistencer implements ObjectPersistencer { public void save(Object obj, File target) throws IOException { ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(target)); try { out.writeObject(obj); } finally { out.close(); } } public Object load(File source) throws IOException, ClassNotFoundException { ObjectInputStream in = new ObjectInputStream(new FileInputStream(source)); try { return in.readObject(); } finally { in.close(); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy