import java.util.* ; import java.io.* ; import java.rmi.* ; import java.rmi.server.* ; public class FileSourceImpl extends UnicastRemoteObject implements FileSource { public FileSourceImpl() throws RemoteException {} public synchronized Vector readFile(String file) throws RemoteException, IOException { Vector lines = new Vector() ; try { BufferedReader in = new BufferedReader(new FileReader(file)) ; while(true) { String line = in.readLine() ; if(line == null) break ; // Normal end of file. lines.addElement(line) ; } } catch (FileNotFoundException e) { ; // OK. Treated as an empty file. } return lines ; } }