Java tutorial
//package com.java2s; import java.io.FileOutputStream; import java.io.ObjectOutputStream; public class Main { public static void serializar(String path, Object obj) throws Exception { FileOutputStream outFile = new FileOutputStream(path); ObjectOutputStream s = new ObjectOutputStream(outFile); s.writeObject(obj); s.close(); } }