private ResourceAccess getNextResource()
	{
		if (input == null)
			return owner.getRandomResource(lockedResources);
		else {
			// Read the next resource to be accessed from the input file
			// Expected format: ACCESS SERVER 1 RESOURCE 5
			String line = input.readLine();
			if (line == null || !line.startsWith("ACCESS SERVER ")) {
				System.out.println("ERROR: Input file is incorrectly formatted. Program aborted.");
				System.exit(1);
			}
			line = line.substring(14);
			StringTokenizer st = new StringTokenizer(line, " RESOURCE ");
			int serverId = Integer.parseInt(st.nextToken());
			if (!st.hasMoreTokens()) {
				System.out.println("ERROR: Input file is incorrectly formatted. Program aborted.");
				System.exit(1);
			}
			int resourceId = Integer.parseInt(st.nextToken());
			return new ResourceAccess(owner.getServer(serverId), serverId, resourceId);
		}
	}