Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Banco (String nombreFichero)throws IOException,ClassNotFoundException {
- ObjectInputStream entrada;
- boolean res = true;
- entrada = new ObjectInputStream(new FileInputStream (nombreFichero));
- aCuentas = new ArrayList <Cuenta>() ;
- try{
- while(res!=false){
- aCuentas.add((Cuenta)entrada.readObject());
- }
- }
- catch(IOException e){res=false;}
- catch(ClassNotFoundException a){res=false;}
- finally { entrada.close();}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement