private SystemState readSystem( InputStream in, String systemId ) throws IOException {
		SystemState system = new SystemState( systemId );
		int capacity = readInt(in);

		// Normally systems are 28 bytes, but if not present on the
		// ship, capacity will be zero, and the system will only
		// occupy the 4 bytes that declared the capacity. And the
		// next system will begin 24 bytes sooner.
		if (capacity > 0) {
			system.setCapacity( capacity );
			system.setPower( readInt(in) );
			system.setDamagedBars( readInt(in) );
			system.setIonizedBars( readInt(in) );

			int deionizationTicks = readInt(in);
			if ( deionizationTicks == -2147483648 )
				deionizationTicks = Integer.MIN_VALUE;
			system.setDeionizationTicks( deionizationTicks );

			system.setRepairProgress( readInt(in) );
			system.setDamageProgress( readInt(in) );
		}
		return system;
	}