public static Integer[] getLocalContainerPids(String jpsCommand) {
		Assert.hasText(jpsCommand, "jpsCommand can not be empty nor null");
		Integer[] result = null;
		try {
			Process p = Runtime.getRuntime().exec(jpsCommand);
			p.waitFor();
			String pidInfo = org.springframework.util.StreamUtils.copyToString(p.getInputStream(),
					Charset.forName("UTF-8"));
			result = extractPidsFromJPS(pidInfo);
		}
		catch (IOException e) {
			throw new IllegalStateException(e.getMessage(), e);
		}
		catch (InterruptedException e) {
			throw new IllegalStateException(e.getMessage(), e);
		}
		return result;
	}
Retrieves the container pids on the local machine.  
@param jpsCommand  jps command that will reveal the pids.
@return An Integer array that contains the pids.
spring-xd-integration-test/src/main/java/org/springframework/xd/integration/util/StreamUtils.java