Java Code Examples for org.openjdk.jmh.util.FileUtils

The following examples show how to use org.openjdk.jmh.util.FileUtils. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: spring-cloud-sleuth   Source File: ProcessLauncherState.java    License: Apache License 2.0 5 votes vote down vote up
public Collection<String> capture(String... additional) throws Exception {
	List<String> args = new ArrayList<>(this.args);
	args.addAll(Arrays.asList(additional));
	ProcessBuilder builder = new ProcessBuilder(args);
	builder.directory(home);
	builder.redirectErrorStream(true);
	customize(builder);
	if (!"false".equals(System.getProperty("debug", "false"))) {
		System.err.println("Running: " + Utils.join(args, " "));
	}
	started = builder.start();
	return FileUtils.readAllLines(started.getInputStream());
}