public static List read(File file) {
		ObjectInputStream input = null;
		try {
			input = new ObjectInputStream(new FileInputStream(file));
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}

		int amount;
		try {
			amount = (Integer) input.readObject();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
			return null;
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}

		List object = new ArrayList();
		for (int i = 0; i < amount; i++) {
			try {
				object.add(input.readObject());
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
				return null;
			} catch (IOException e) {
				e.printStackTrace();
				return null;
			}
		}

		try {
			input.close();
		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
		return object;
	}