public static void main(String[] arg) {
        ObjectInputStream ois = null;
        borrarPantalla();
        String NIF;
        while(!terminar) {
            try {
                ois = new ObjectInputStream(new FileInputStream("ficheros/personas.dat"));
                System.out.print("Introduzca el DNI a buscar: ");
                NIF = teclado.readLine();
                Persona p = (Persona)ois.readObject();
                while(p != null) {
                    if(p.getNif().equals(NIF)){
                        System.out.println(p.toString());
                        break;
                    }
                    p =(Persona)ois.readObject();
                }
                continuar();
            }
            catch (ClassNotFoundException e) {
                System.out.println("error --> " + e);
            }
            catch (IOException e) {
                System.out.println("NIF no encontrado");
                continuar();
            }
        }
    }