archive.system
Class FileSystem

java.lang.Object
  extended by archive.system.FileSystem
All Implemented Interfaces:
FileExport

public class FileSystem
extends java.lang.Object
implements FileExport

Una classe che si occupa della lettura e scrittura su file. Implementa l'interfaccia FileExport. L'Archivio ritornato dal metodo read() viene costruito insieme a tutte le sue componenti e memorizzato in AgenziaSystem


Constructor Summary
FileSystem()
           
FileSystem(java.lang.String path)
           
 
Method Summary
 void exportPrenPacchetti(java.lang.String path)
          Implementa il metodo dell'interfaccia FileExport
 void exportPrenVoli(java.lang.String path)
          Implementa il metodo dell'interfaccia FileExport
 Archivio read()
          Questo metodo legge segmenti di file, quando il tipo di informazioni cambia, manda a switchState l'ultimo segmento letto con informazioni sul tipo
 void write(java.lang.String path)
          Scrive l'archivio su file Implementa il metodo dell'interfaccia FileExport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileSystem

public FileSystem()

FileSystem

public FileSystem(java.lang.String path)
           throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

read

public Archivio read()
              throws java.io.FileNotFoundException
Questo metodo legge segmenti di file, quando il tipo di informazioni cambia, manda a switchState l'ultimo segmento letto con informazioni sul tipo

Returns:
archivio Archivio realizzato tramite file
Throws:
java.io.FileNotFoundException

write

public void write(java.lang.String path)
           throws java.io.FileNotFoundException
Scrive l'archivio su file Implementa il metodo dell'interfaccia FileExport

Specified by:
write in interface FileExport
Parameters:
path - percorso del file
Throws:
java.io.FileNotFoundException

exportPrenPacchetti

public void exportPrenPacchetti(java.lang.String path)
                         throws java.io.FileNotFoundException
Implementa il metodo dell'interfaccia FileExport

Specified by:
exportPrenPacchetti in interface FileExport
Parameters:
path - percorso del file per l'esportazione pacchetti
Throws:
java.io.FileNotFoundException - percorso invalido

exportPrenVoli

public void exportPrenVoli(java.lang.String path)
                    throws java.io.FileNotFoundException
Implementa il metodo dell'interfaccia FileExport

Specified by:
exportPrenVoli in interface FileExport
Parameters:
path - percorso del file
Throws:
java.io.FileNotFoundException