private static void readByteFile (Path path){
         
         DataInputStream dataIn=null;
        try {
        //apertura del stream.
        dataIn= new DataInputStream(Files.newInputStream(path));
        try{
            while (true){
                System.out.println(dataIn.readUTF()+ " "
                        +dataIn.readUTF()+" "+dataIn.readInt()+" "+dataIn.readDouble());
            }
        }catch (EOFException ex){System.out.println("Fin de fichero detectado");}   
        
        } catch (IOException ex) {
            System.err.println("Error I/O "+ex);
        }finally{
            //Se cierra el stream y se liberan los recursos de sistema asociados a él.
            if (dataIn!=null)
            try{
                dataIn.close();
            }catch (IOException ex) {
                System.err.println("Error I/O "+ex);
            } 
        }
     
     }