public static void main(String[] args) throws ClassNotFoundException, IOException {
		
		/*ObjectOutputStream 	out = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream("test.txt")));
		out.writeObject(new Theater(1, "NAME", "THEATER", 1));
		out.writeObject(new Theater(2, "NAME2", "THEATER2", 2));
		out.close();*/
		ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream("test.txt")));
		Object o = in.readObject();
		Theater t;
		LinkedList<Theater> ts = new LinkedList<Theater>();
		while( o != null){
			
			t = (Theater) o;
			ts.add(t);
			try {
				o = in.readObject();
			} catch (EOFException e) {
				break;
			}
			System.out.println("--");
			if( o == null)
				System.out.println("Null");
		}
		System.out.println("t size: " + ts.size() +", " + ts.getFirst().toString());
		
		in.close();
	}