You are on page 1of 1

public class ArchivosObj() { public static Object Lee(String arch) { Object io=null; try { ObjectInputEstream ois=new ObjectInputEstream(newFileInputstream(new Fil

e(arch))); io=ois.readObject(); ois.close(); }catch(Exception e){} return io; } public static void Escribe(Object objeto,string arch) { try { ObjectOutputEstream oos=new ObjectOutputEstream(new File(arch)); oos.writeObject(objeto); oos.flush(); oos.close(); }catch(Exception e){} } } }

You might also like